From 801ab39a248fcc0241dedced8c622e11c66bd246 Mon Sep 17 00:00:00 2001 From: Wagner Costa Date: Wed, 4 Jan 2023 10:36:19 -0300 Subject: [PATCH] fix get dataframe data to include startup_candle --- freqtrade/freqai/freqai_interface.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 03f458e47..a0f29a301 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -313,10 +313,9 @@ class IFreqaiModel(ABC): dk.append_predictions(append_df) else: if populate_indicators: - timerange_str_from_main_df = ( - dataframe["date"].min().strftime("%Y%m%d") + "-" + - dataframe["date"].max().strftime("%Y%m%d")) - timerange = TimeRange.parse_timerange(timerange_str_from_main_df) + tr_from_main_df = (f'{dataframe["date"].min().strftime("%Y%m%d")}' + f'-{dataframe["date"].max().strftime("%Y%m%d")}') + timerange = TimeRange.parse_timerange(tr_from_main_df) self.dd.load_all_pair_histories(timerange, self.dk) corr_df, base_df = self.dd.get_base_and_corr_dataframes(timerange, pair, dk) dataframe = self.dk.use_strategy_to_populate_indicators(