From 153336d4241b79c8c9195ca19124fe6be56cfb29 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Sun, 31 Jul 2022 15:45:15 +0200 Subject: [PATCH] move corr_pairlist expansion to after expand_pairlist() --- freqtrade/plugins/pairlist/pairlist_helpers.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/freqtrade/plugins/pairlist/pairlist_helpers.py b/freqtrade/plugins/pairlist/pairlist_helpers.py index ee17c1be9..a07a0f783 100644 --- a/freqtrade/plugins/pairlist/pairlist_helpers.py +++ b/freqtrade/plugins/pairlist/pairlist_helpers.py @@ -43,12 +43,10 @@ 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', {}): corr_pairlist = config['freqai']['feature_parameters']['include_corr_pairlist'] - full_pairs = config['pairs'] + [pair for pair in corr_pairlist - if pair not in config['pairs']] - expanded_pairs = expand_pairlist(full_pairs, markets) - else: - expanded_pairs = expand_pairlist(config['pairs'], markets) + expanded_pairs += [pair for pair in corr_pairlist + if pair not in config['pairs']] return expanded_pairs