add trade.has_open_position check to stoploss on exchange handling, remove deprecated comment

This commit is contained in:
Axel-CH
2024-09-24 12:26:36 -04:00
parent beebc1743a
commit bfaf9e690d

View File

@@ -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