mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Double-check cancelling stop order didn't close the trade
This commit is contained in:
parent
1f543666f4
commit
193d88c9c8
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user