From 48506f29456282746552cf1d6a026d9bde983fd5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 22 Dec 2024 18:03:04 +0100 Subject: [PATCH] fix: always cancel al open orders if the order ain't identical --- freqtrade/freqtradebot.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 067210b24..fd1f586b4 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1781,16 +1781,15 @@ class FreqtradeBot(LoggingMixin): f"Keeping existing {trade.exit_side} order. {price=}, {amount=}" ) return True - else: - # cancel open orders of this trade if order is different - self.cancel_open_orders_of_trade( - trade, - [trade.entry_side, trade.exit_side], - constants.CANCEL_REASON["REPLACE"], - True, - ) - Trade.commit() - return False + # cancel open orders of this trade if order is different + self.cancel_open_orders_of_trade( + trade, + [trade.entry_side, trade.exit_side], + constants.CANCEL_REASON["REPLACE"], + True, + ) + Trade.commit() + return False return False