Only load protections when necessary
This commit is contained in:
parent
946fb09455
commit
a3f9cd2c26
@ -122,6 +122,7 @@ class Backtesting:
|
||||
Trade.use_db = False
|
||||
PairLocks.timeframe = self.config['timeframe']
|
||||
PairLocks.use_db = False
|
||||
if self.config.get('enable_protections', False):
|
||||
self.protections = ProtectionManager(self.config)
|
||||
|
||||
# Get maximum required startup period
|
||||
@ -450,7 +451,7 @@ class Backtesting:
|
||||
end_date=max_date.datetime,
|
||||
max_open_trades=max_open_trades,
|
||||
position_stacking=position_stacking,
|
||||
enable_protections=self.config.get('enable_protections'),
|
||||
enable_protections=self.config.get('enable_protections', False),
|
||||
)
|
||||
all_results[self.strategy.get_strategy_name()] = {
|
||||
'results': results,
|
||||
|
Loading…
Reference in New Issue
Block a user