Improve conditions for removal of pairs

This commit is contained in:
Matthias 2024-02-24 14:00:50 +01:00
parent 3677953d90
commit 81de29a1e3
2 changed files with 9 additions and 4 deletions

View File

@ -123,8 +123,12 @@ class VolatilityFilter(IPairList):
volatility_avg = self._calculate_volatility(p, daily_candles) volatility_avg = self._calculate_volatility(p, daily_candles)
if volatility_avg is not None and self._validate_pair_loc(p, volatility_avg): if volatility_avg is not None:
resulting_pairlist.append(p) if self._validate_pair_loc(p, volatility_avg):
resulting_pairlist.append(p)
else:
self.log_once(f"Removed {p} from whitelist, no candles found.", logger.info)
if self._sort_direction: if self._sort_direction:
volatilitys[p] = volatility_avg if not np.isnan(volatility_avg) else 0 volatilitys[p] = volatility_avg if not np.isnan(volatility_avg) else 0

View File

@ -109,8 +109,9 @@ class RangeStabilityFilter(IPairList):
pct_change = self._calculate_rate_of_change(p, daily_candles) pct_change = self._calculate_rate_of_change(p, daily_candles)
if pct_change is not None and self._validate_pair_loc(p, pct_change): if pct_change is not None:
resulting_pairlist.append(p) if self._validate_pair_loc(p, pct_change):
resulting_pairlist.append(p)
else: else:
self.log_once(f"Removed {p} from whitelist, no candles found.", logger.info) self.log_once(f"Removed {p} from whitelist, no candles found.", logger.info)