Check if no backtest data is found and fail gracefully

This commit is contained in:
xmatthias
2018-06-11 19:50:43 +02:00
parent 655155bbab
commit 335d1fbbbc
2 changed files with 43 additions and 0 deletions

View File

@@ -237,6 +237,9 @@ class Backtesting(object):
timerange=timerange
)
if not data:
logger.critical("No data found. Terminating.")
return
# Ignore max_open_trades in backtesting, except realistic flag was passed
if self.config.get('realistic_simulation', False):
max_open_trades = self.config['max_open_trades']