diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 5cd873f23..921fd9f1b 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -12,6 +12,7 @@ from pandas import DataFrame from freqtrade.constants import CUSTOM_TAG_MAX_LENGTH, Config, IntOrInf, ListPairsWithTimeframes from freqtrade.data.converter import populate_dataframe_with_trades +from freqtrade.data.converter.converter import reduce_dataframe_footprint from freqtrade.data.dataprovider import DataProvider from freqtrade.enums import ( CandleType, @@ -1735,7 +1736,13 @@ class IStrategy(ABC, HyperStrategyMixin): ) self._if_enabled_populate_trades(dataframe, metadata) - return self.populate_indicators(dataframe, metadata) + dataframe = self.populate_indicators(dataframe, metadata) + if self.config.get("reduce_df_footprint", False) and self.config.get("runmode") not in [ + RunMode.DRY_RUN, + RunMode.LIVE, + ]: + dataframe = reduce_dataframe_footprint(dataframe) + return dataframe def advise_entry(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """