From bfaf9e690d655040c788b5761d016db33e6d0904 Mon Sep 17 00:00:00 2001 From: Axel-CH Date: Tue, 24 Sep 2024 12:26:36 -0400 Subject: [PATCH] add trade.has_open_position check to stoploss on exchange handling, remove deprecated comment --- freqtrade/freqtradebot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index d7f895f56..1ee826845 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1424,9 +1424,7 @@ class FreqtradeBot(LoggingMixin): self.handle_protections(trade.pair, trade.trade_direction) return True - if not trade.is_open: - # Trade has an open order, Stoploss-handling can't happen in this case - # as the Amount on the exchange is tied up in another trade. + if not trade.has_open_position or not trade.is_open: # The trade can be closed already (sell-order fill confirmation came in this iteration) return False