From 79ce1ddaef490550b725954330000bc68317960d Mon Sep 17 00:00:00 2001 From: Axel-CH Date: Mon, 9 Sep 2024 13:30:07 -0400 Subject: [PATCH] rollback on process_open_trade_positions. Adjust position only if there is no open order, change will be made on other PR --- freqtrade/freqtradebot.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 05cab0e5f..64139f0ae 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -713,13 +713,14 @@ class FreqtradeBot(LoggingMixin): """ # Walk through each pair and check if it needs changes for trade in Trade.get_open_trades(): - # Do a wallets update (will be ratelimited to once per hour) - self.wallets.update(False) - try: - self.check_and_call_adjust_trade_position(trade) - except DependencyException as exception: - logger.warning( - f"Unable to adjust position of trade for {trade.pair}: {exception}") + if not trade.has_open_orders: + # Do a wallets update (will be ratelimited to once per hour) + self.wallets.update(False) + try: + self.check_and_call_adjust_trade_position(trade) + except DependencyException as exception: + logger.warning( + f"Unable to adjust position of trade for {trade.pair}: {exception}") def check_and_call_adjust_trade_position(self, trade: Trade): """