mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve conditions for removal of pairs
This commit is contained in:
parent
3677953d90
commit
81de29a1e3
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user