Don't repeat backtest-storing

This commit is contained in:
Matthias 2022-04-23 09:23:53 +02:00
parent dff9d52b30
commit 580a2c6545

View File

@ -1157,12 +1157,11 @@ class Backtesting:
else:
self.results = results
if self.config.get('export', 'none') == 'trades':
if self.config.get('export', 'none') in ('trades', 'signals'):
store_backtest_stats(self.config['exportfilename'], self.results)
if (self.config.get('export', 'none') == 'signals' and
self.dataprovider.runmode == RunMode.BACKTEST):
store_backtest_stats(self.config['exportfilename'], self.results)
store_backtest_signal_candles(self.config['exportfilename'], self.processed_dfs)
# Results may be mixed up now. Sort them so they follow --strategy-list order.