From a6454cfc39453dbceb9fbba2bf896b45d64334ee Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 4 Aug 2021 07:14:47 +0200 Subject: [PATCH] Autoenable protections when protection-space is selected --- freqtrade/optimize/hyperopt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py index 18ed66b4a..3eab709da 100644 --- a/freqtrade/optimize/hyperopt.py +++ b/freqtrade/optimize/hyperopt.py @@ -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'):