Simplify PriceFilter
This commit is contained in:
parent
2aa80f915d
commit
cbb2ce3708
@ -58,14 +58,12 @@ class PriceFilter(IPairList):
|
|||||||
:param tickers: Tickers (from exchange.get_tickers()). May be cached.
|
:param tickers: Tickers (from exchange.get_tickers()). May be cached.
|
||||||
:return: new whitelist
|
:return: new whitelist
|
||||||
"""
|
"""
|
||||||
|
if self._low_price_ratio:
|
||||||
# Copy list since we're modifying this list
|
# Copy list since we're modifying this list
|
||||||
for p in deepcopy(pairlist):
|
for p in deepcopy(pairlist):
|
||||||
ticker = tickers.get(p)
|
ticker = tickers[p]
|
||||||
if not ticker:
|
|
||||||
pairlist.remove(p)
|
|
||||||
|
|
||||||
# Filter out assets which would not allow setting a stoploss
|
# Filter out assets which would not allow setting a stoploss
|
||||||
if self._low_price_ratio and not self._validate_ticker_lowprice(ticker):
|
if not self._validate_ticker_lowprice(ticker):
|
||||||
pairlist.remove(p)
|
pairlist.remove(p)
|
||||||
|
|
||||||
return pairlist
|
return pairlist
|
||||||
|
Loading…
Reference in New Issue
Block a user