From b2abdab7cd4e729b7a00915985195bbdda799732 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 28 Jul 2023 07:16:32 +0200 Subject: [PATCH] Fix bug where adjust_entry_price was called for exit orders closes #8973 --- freqtrade/freqtradebot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 1fdf79b68..9d35aee0f 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1383,7 +1383,10 @@ class FreqtradeBot(LoggingMixin): latest_candle_close_date = timeframe_to_next_date(self.strategy.timeframe, latest_candle_open_date) # Check if new candle - if order_obj and latest_candle_close_date > order_obj.order_date_utc: + if ( + order_obj and order_obj.side == trade.entry_side + and latest_candle_close_date > order_obj.order_date_utc + ): # New candle proposed_rate = self.exchange.get_rate( trade.pair, side='entry', is_short=trade.is_short, refresh=True)