Don''t fully fail bot when invalid price value is reached

closes #8300
This commit is contained in:
Matthias
2023-03-22 19:46:07 +01:00
parent 8cf3e9f91b
commit 150c5510c7
5 changed files with 22 additions and 14 deletions

View File

@@ -1135,7 +1135,11 @@ class Exchange:
"sell" else (stop_price >= limit_rate))
# Ensure rate is less than stop price
if bad_stop_price:
raise OperationalException(
# This can for example happen if the stop / liquidation price is set to 0
# Which is possible if a market-order closes right away.
# The InvalidOrderException will bubble up to exit_positions, where it will be
# handled gracefully.
raise InvalidOrderException(
"In stoploss limit order, stop price should be more than limit price. "
f"Stop price: {stop_price}, Limit price: {limit_rate}, "
f"Limit Price pct: {limit_price_pct}"