From 9204f013124761d21ee1374fff4a976131ec75bb Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 27 Aug 2022 07:23:02 +0200 Subject: [PATCH] Don't lock pairs on partial exit --- freqtrade/freqtradebot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index f4731220c..d84d50b7c 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1552,9 +1552,10 @@ class FreqtradeBot(LoggingMixin): trade.close_rate_requested = limit trade.exit_reason = exit_reason - # Lock pair for one candle to prevent immediate re-trading - self.strategy.lock_pair(trade.pair, datetime.now(timezone.utc), - reason='Auto lock') + if not sub_trade_amt: + # Lock pair for one candle to prevent immediate re-trading + self.strategy.lock_pair(trade.pair, datetime.now(timezone.utc), + reason='Auto lock') self._notify_exit(trade, order_type, sub_trade=bool(sub_trade_amt), order=order_obj) # In case of market sell orders the order can be closed immediately