From 1315d024372d2d284f5b8fbd84f420104bf1220c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 22 May 2022 09:01:46 +0200 Subject: [PATCH] Fix startup sending "longed" messages for open stoplosses --- freqtrade/freqtradebot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index da35c12ff..3dccb45e4 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -299,7 +299,8 @@ class FreqtradeBot(LoggingMixin): fo = self.exchange.fetch_order_or_stoploss_order(order.order_id, order.ft_pair, order.ft_order_side == 'stoploss') - self.update_trade_state(order.trade, order.order_id, fo) + self.update_trade_state(order.trade, order.order_id, fo, + stoploss_order=(order.ft_order_side == 'stoploss')) except ExchangeError as e: @@ -1663,7 +1664,7 @@ class FreqtradeBot(LoggingMixin): if send_msg and not stoploss_order and not trade.open_order_id: self._notify_exit(trade, '', True) self.handle_protections(trade.pair, trade.trade_direction) - elif send_msg and not trade.open_order_id: + elif send_msg and not trade.open_order_id and not stoploss_order: # Enter fill self._notify_enter(trade, order, fill=True)