Add "freqai.enabled" flag to disable freqAI via config flag

aligns with how other optional modules work in freqtrade.
This commit is contained in:
Matthias
2022-08-13 09:24:04 +02:00
parent 49989012ab
commit 3b827ee60a
6 changed files with 16 additions and 10 deletions

View File

@@ -146,7 +146,7 @@ class IStrategy(ABC, HyperStrategyMixin):
self._ft_informative.append((informative_data, cls_method))
def load_freqAI_model(self) -> None:
if self.config.get('freqai', None):
if self.config.get('freqai', {}).get('enabled', False):
# Import here to avoid importing this if freqAI is disabled
from freqtrade.resolvers.freqaimodel_resolver import FreqaiModelResolver