[SQUASH] Use HyperStrategyMixin as part of IStrategy interface.

This commit is contained in:
Rokas Kupstys
2021-03-24 16:03:38 +02:00
parent 2d13e5fd50
commit e9f0babe8a
6 changed files with 6 additions and 24 deletions

View File

@@ -70,10 +70,6 @@ class Hyperopt:
self.backtesting = Backtesting(self.config)
if not self.config.get('hyperopt'):
if not getattr(self.backtesting.strategy, 'HYPER_STRATEGY', False):
raise OperationalException('Strategy is not auto-hyperoptable. Specify --hyperopt '
'parameter or add HyperStrategyMixin mixin to your '
'strategy class.')
self.custom_hyperopt = HyperOptAuto(self.config)
else:
self.custom_hyperopt = HyperOptResolver.load_hyperopt(self.config)