Autoenable protections when protection-space is selected

This commit is contained in:
Matthias 2021-08-04 07:14:47 +02:00
parent 091bf7c4d2
commit a6454cfc39

View File

@ -247,6 +247,8 @@ class Hyperopt:
if self.auto_hyperopt and HyperoptTools.has_space(self.config, 'protection'):
# Protections can only be optimized when using the Parameter interface
logger.debug("Hyperopt has 'protection' space")
# Enable Protections if protection space is selected.
self.config['enable_protections'] = True
self.protection_space = self.custom_hyperopt.protection_space()
if HyperoptTools.has_space(self.config, 'buy'):