Add parameter to enable protections for backtesting

This commit is contained in:
Matthias
2020-11-23 20:29:29 +01:00
parent 32189d27c8
commit e2d15f4082
5 changed files with 25 additions and 5 deletions

View File

@@ -211,6 +211,9 @@ class Configuration:
self._args_to_config(config, argname='position_stacking',
logstring='Parameter --enable-position-stacking detected ...')
self._args_to_config(
config, argname='enable_protections',
logstring='Parameter --enable-protections detected, enabling Protections. ...')
# Setting max_open_trades to infinite if -1
if config.get('max_open_trades') == -1:
config['max_open_trades'] = float('inf')