From b35c64b6c0e376667544885130869aaf64746486 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Sun, 19 Jun 2022 16:41:09 +0200 Subject: [PATCH] fix bug in backtest, typo in example strat --- freqtrade/freqai/freqai_interface.py | 2 +- freqtrade/templates/FreqaiExampleStrategy.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/freqai_interface.py b/freqtrade/freqai/freqai_interface.py index 02aac2b58..38fca7de0 100644 --- a/freqtrade/freqai/freqai_interface.py +++ b/freqtrade/freqai/freqai_interface.py @@ -198,7 +198,7 @@ class IFreqaiModel(ABC): self.model = self.train(dataframe_train, metadata['pair'], dh) self.data_drawer.pair_dict[metadata['pair']][ 'trained_timestamp'] = trained_timestamp.stopts - dh.set_new_model_names(metadata, trained_timestamp) + dh.set_new_model_names(metadata['pair'], trained_timestamp) dh.save_data(self.model, metadata['pair']) else: self.model = dh.load_data(metadata['pair']) diff --git a/freqtrade/templates/FreqaiExampleStrategy.py b/freqtrade/templates/FreqaiExampleStrategy.py index 50e729d75..5893bf9ac 100644 --- a/freqtrade/templates/FreqaiExampleStrategy.py +++ b/freqtrade/templates/FreqaiExampleStrategy.py @@ -100,7 +100,7 @@ class FreqaiExampleStrategy(IStrategy): informative[f"{coin}20sma-period_{t}"] = ta.SMA(informative, timeperiod=t) informative[f"{coin}21ema-period_{t}"] = ta.EMA(informative, timeperiod=t) informative[f"%-{coin}close_over_20sma-period_{t}"] = ( - informative["close"] / informative[coin + "20sma-period_{t}"] + informative["close"] / informative[f"{coin}20sma-period_{t}"] ) informative[f"%-{coin}mfi-period_{t}"] = ta.MFI(informative, timeperiod=t)