mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
feat: add reduce_df_footprint to backtest/hyperopt modes
Co-authored-by: alisayyah <ali.sayyah2@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ from pandas import DataFrame
|
|||||||
|
|
||||||
from freqtrade.constants import CUSTOM_TAG_MAX_LENGTH, Config, IntOrInf, ListPairsWithTimeframes
|
from freqtrade.constants import CUSTOM_TAG_MAX_LENGTH, Config, IntOrInf, ListPairsWithTimeframes
|
||||||
from freqtrade.data.converter import populate_dataframe_with_trades
|
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.data.dataprovider import DataProvider
|
||||||
from freqtrade.enums import (
|
from freqtrade.enums import (
|
||||||
CandleType,
|
CandleType,
|
||||||
@@ -1735,7 +1736,13 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self._if_enabled_populate_trades(dataframe, metadata)
|
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:
|
def advise_entry(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user