ensure user sets startup candles in backtesting mode
This commit is contained in:
parent
05ec5c5e54
commit
26de992d20
@ -208,7 +208,11 @@ class Backtesting:
|
|||||||
self.progress.init_step(BacktestState.DATALOAD, 1)
|
self.progress.init_step(BacktestState.DATALOAD, 1)
|
||||||
|
|
||||||
if self.config.get('freqai') is not None:
|
if self.config.get('freqai') is not None:
|
||||||
self.required_startup += int(self.config.get('freqai', {}).get('startup_candles', 1000))
|
startup_candles = int(self.config.get('freqai', {}).get('startup_candles', 0))
|
||||||
|
if not startup_candles:
|
||||||
|
raise OperationalException('FreqAI backtesting module requires user set '
|
||||||
|
'startup_candles in config.')
|
||||||
|
self.required_startup += int(self.config.get('freqai', {}).get('startup_candles', 0))
|
||||||
logger.info(f'Increasing startup_candle_count for freqai to {self.required_startup}')
|
logger.info(f'Increasing startup_candle_count for freqai to {self.required_startup}')
|
||||||
self.config['startup_candle_count'] = self.required_startup
|
self.config['startup_candle_count'] = self.required_startup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user