Double-check cancelling stop order didn't close the trade

This commit is contained in:
Matthias 2023-05-31 14:12:03 +02:00
parent 1f543666f4
commit 193d88c9c8

View File

@ -1302,6 +1302,10 @@ class FreqtradeBot(LoggingMixin):
f"(orderid:{order['id']}) in order to add another one ...")
self.cancel_stoploss_on_exchange(trade)
if not trade.is_open:
logger.warning(
f"Trade {trade} is closed, not creating trailing stoploss order.")
return
# Create new stoploss order
if not self.create_stoploss_order(trade=trade, stop_price=stoploss_norm):