Don't load protections from config if strategy defines a property

This commit is contained in:
Matthias
2021-06-17 21:01:22 +02:00
parent 8562e19776
commit e1010ff592
6 changed files with 9 additions and 8 deletions

View File

@@ -137,7 +137,7 @@ class Backtesting:
if hasattr(strategy, 'protections'):
conf = deepcopy(conf)
conf['protections'] = strategy.protections
self.protections = ProtectionManager(conf)
self.protections = ProtectionManager(self.config, strategy.protections)
def load_bt_data(self) -> Tuple[Dict[str, DataFrame], TimeRange]:
"""