Add price_get_one_pip filter

This commit is contained in:
Matthias
2020-04-15 07:19:27 +02:00
parent c8ccdbcb9a
commit 36e714a7b2
2 changed files with 13 additions and 3 deletions

View File

@@ -38,9 +38,8 @@ class PriceFilter(IPairList):
:param precision: Precision
:return: True if the pair can stay, false if it should be removed
"""
precision = self._exchange.markets[ticker['symbol']]['precision']['price']
compare = ticker['last'] + 1 / pow(10, precision)
compare = ticker['last'] + self._exchange.price_get_one_pip(ticker['symbol'],
ticker['last'])
changeperc = (compare - ticker['last']) / ticker['last']
if changeperc > self._low_price_ratio:
logger.info(f"Removed {ticker['symbol']} from whitelist, "