Fix protections being loaded multiple times for first strategy when backtesting.

This commit is contained in:
Rokas Kupstys
2021-05-13 11:49:12 +03:00
parent 29fed37df3
commit 2d5f465f1b
4 changed files with 18 additions and 2 deletions

View File

@@ -79,6 +79,7 @@ class Hyperopt:
self.custom_hyperopt = HyperOptAuto(self.config)
else:
self.custom_hyperopt = HyperOptResolver.load_hyperopt(self.config)
self.backtesting._set_strategy(self.backtesting.strategylist[0])
self.custom_hyperopt.strategy = self.backtesting.strategy
self.custom_hyperoptloss = HyperOptLossResolver.load_hyperoptloss(self.config)