From 50ab0dc6c5fa2b9794828ed76ca9cc63f504c4f7 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 9 Mar 2022 07:04:59 +0100 Subject: [PATCH] Fix subtle bug --- freqtrade/freqtradebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 03c1c4eaf..f87c8e2ff 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -1352,7 +1352,7 @@ class FreqtradeBot(LoggingMixin): is_short=trade.is_short, open_date=trade.open_date, ) - exit_type = 'sell' + exit_type = 'exit' if sell_reason.sell_type in (SellType.STOP_LOSS, SellType.TRAILING_STOP_LOSS): exit_type = 'stoploss' @@ -1376,7 +1376,7 @@ class FreqtradeBot(LoggingMixin): # First cancelling stoploss on exchange ... trade = self.cancel_stoploss_on_exchange(trade) - order_type = ordertype or self.strategy.order_types['exit'] + order_type = ordertype or self.strategy.order_types[exit_type] if sell_reason.sell_type == SellType.EMERGENCY_SELL: # Emergency sells (default to market!) order_type = self.strategy.order_types.get("emergencyexit", "market")