price_last_balance renaming

This commit is contained in:
Matthias
2022-03-28 19:48:45 +02:00
parent d7c6520268
commit 2d740230f7
16 changed files with 50 additions and 33 deletions

View File

@@ -1503,10 +1503,10 @@ class Exchange:
ticker_rate = ticker[price_side]
if ticker['last'] and ticker_rate:
if side == 'entry' and ticker_rate > ticker['last']:
balance = conf_strategy.get('ask_last_balance', 0.0)
balance = conf_strategy.get('price_last_balance', 0.0)
ticker_rate = ticker_rate + balance * (ticker['last'] - ticker_rate)
elif side == 'exit' and ticker_rate < ticker['last']:
balance = conf_strategy.get('bid_last_balance', 0.0)
balance = conf_strategy.get('price_last_balance', 0.0)
ticker_rate = ticker_rate - balance * (ticker_rate - ticker['last'])
rate = ticker_rate