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

@@ -44,7 +44,7 @@ def expand_pairlist(wildcardpl: List[str], available_pairs: List[str],
def dynamic_expand_pairlist(config: dict, markets: list) -> List[str]:
expanded_pairs = expand_pairlist(config['pairs'], markets)
if config.get('freqai', {}):
if config.get('freqai', {}).get('enabled', False):
corr_pairlist = config['freqai']['feature_parameters']['include_corr_pairlist']
expanded_pairs += [pair for pair in corr_pairlist
if pair not in config['pairs']]