Fix wrong partial exit notification

This commit is contained in:
Matthias 2022-05-29 09:51:47 +02:00
parent 200d617679
commit 20a7a6e0d8

View File

@ -1708,10 +1708,12 @@ class FreqtradeBot(LoggingMixin):
sub_trade = not isclose(order_obj.safe_amount_after_fee,
trade.amount, abs_tol=constants.MATH_CLOSE_PREC)
if not trade.is_open:
if order_obj.ft_order_side == trade.exit_side:
# Exit notification
if send_msg and not stoploss_order and not trade.open_order_id:
self._notify_exit(trade, '', True, sub_trade=sub_trade, order=order_obj)
self.handle_protections(trade.pair, trade.trade_direction)
if not trade.is_open:
self.handle_protections(trade.pair, trade.trade_direction)
elif send_msg and not trade.open_order_id and not stoploss_order:
# Enter fill
self._notify_enter(trade, order_obj, fill=True, sub_trade=sub_trade)