From a7029e35b51404424f872e1663d9602f29695607 Mon Sep 17 00:00:00 2001 From: robcaulk Date: Tue, 10 May 2022 11:39:01 +0200 Subject: [PATCH] ensure informative pairs includes any combination of whitelist - corr_pairlist --- freqtrade/templates/FreqaiExampleStrategy.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/freqtrade/templates/FreqaiExampleStrategy.py b/freqtrade/templates/FreqaiExampleStrategy.py index 45526e2ac..e2bb6e041 100644 --- a/freqtrade/templates/FreqaiExampleStrategy.py +++ b/freqtrade/templates/FreqaiExampleStrategy.py @@ -47,12 +47,15 @@ class FreqaiExampleStrategy(IStrategy): startup_candle_count: int = 300 def informative_pairs(self): - pairs = self.config["freqai"]["corr_pairlist"] + whitelist_pairs = self.dp.current_whitelist() + corr_pairs = self.config["freqai"]["corr_pairlist"] informative_pairs = [] for tf in self.config["freqai"]["timeframes"]: - # informative_pairs.append((self.pair, tf)) - # informative_pairs.append([(pair, tf) for pair in pairs]) - for pair in pairs: + for pair in whitelist_pairs: + informative_pairs.append((pair, tf)) + for pair in corr_pairs: + if pair in whitelist_pairs: + continue # avoid duplication informative_pairs.append((pair, tf)) return informative_pairs