backtesting: only respect max_open_trades with realistic_simulation
This commit is contained in:
parent
93931eb32b
commit
a6a38735b1
@ -227,7 +227,13 @@ class Backtesting(object):
|
||||
timerange=timerange
|
||||
)
|
||||
|
||||
max_open_trades = self.config.get('max_open_trades', 0)
|
||||
# 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']
|
||||
else:
|
||||
self.logger.info('Ignoring max_open_trades (realistic_simulation not set) ...')
|
||||
max_open_trades = 0
|
||||
|
||||
preprocessed = self.tickerdata_to_dataframe(data)
|
||||
|
||||
# Print timeframe
|
||||
|
Loading…
Reference in New Issue
Block a user