mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 11:51:19 +00:00
fix: ensure stoploss on exchange is canceled once the trade closes.
This commit is contained in:
@@ -2387,6 +2387,8 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
self.strategy.ft_stoploss_adjust(
|
self.strategy.ft_stoploss_adjust(
|
||||||
current_rate, trade, datetime.now(UTC), profit, 0, after_fill=True
|
current_rate, trade, datetime.now(UTC), profit, 0, after_fill=True
|
||||||
)
|
)
|
||||||
|
if not trade.is_open:
|
||||||
|
self.cancel_stoploss_on_exchange(trade)
|
||||||
# Updating wallets when order is closed
|
# Updating wallets when order is closed
|
||||||
self.wallets.update()
|
self.wallets.update()
|
||||||
return trade
|
return trade
|
||||||
|
|||||||
Reference in New Issue
Block a user