From db1d3679415292fef702a64d66ec3f78bca8a255 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Fri, 5 Aug 2022 13:46:20 +0200 Subject: [PATCH] fix bug associated to fit_live_predictions_candles --- freqtrade/freqai/freqai_interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 3978fc7b2..33828c743 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -532,6 +532,8 @@ class IFreqaiModel(ABC): :param: pair: str = current pair """ num_candles = self.freqai_info.get('fit_live_predictions_candles', 600) + if not num_candles: + num_candles = 600 df_tail = df.tail(num_candles) trained_predictions = model.predict(df_tail) pred_df = DataFrame(trained_predictions, columns=dk.label_list)