fix bug associated to fit_live_predictions_candles

This commit is contained in:
robcaulk 2022-08-05 13:46:20 +02:00
parent 26de992d20
commit db1d367941

View File

@ -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)