ensure informative pairs includes any combination of whitelist - corr_pairlist

This commit is contained in:
robcaulk 2022-05-10 11:39:01 +02:00
parent 9b3e5faebe
commit a7029e35b5

View File

@ -47,12 +47,15 @@ class FreqaiExampleStrategy(IStrategy):
startup_candle_count: int = 300 startup_candle_count: int = 300
def informative_pairs(self): 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 = [] informative_pairs = []
for tf in self.config["freqai"]["timeframes"]: for tf in self.config["freqai"]["timeframes"]:
# informative_pairs.append((self.pair, tf)) for pair in whitelist_pairs:
# informative_pairs.append([(pair, tf) for pair in pairs]) informative_pairs.append((pair, tf))
for pair in pairs: for pair in corr_pairs:
if pair in whitelist_pairs:
continue # avoid duplication
informative_pairs.append((pair, tf)) informative_pairs.append((pair, tf))
return informative_pairs return informative_pairs