optional style for interfacing freqai with backtesting

This commit is contained in:
robcaulk
2022-05-06 13:15:06 +02:00
parent e9a7b68bc1
commit b03c7b514d
2 changed files with 2 additions and 9 deletions

View File

@@ -204,7 +204,7 @@ class Backtesting:
"""
self.progress.init_step(BacktestState.DATALOAD, 1)
if self.config['freqai']['train_period'] > 0:
if self.config.get('freqai', {}).get('train_period') > 0:
self.required_startup += int((self.config['freqai']['train_period'] * 86400) /
timeframe_to_seconds(self.config['timeframe']))
logger.info("Increasing startup_candle_count for freqai to %s", self.required_startup)