From 79e15591effd2855d48877f4498b82604aad3e74 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 29 Dec 2023 18:23:28 +0100 Subject: [PATCH] Improve condition for last exit (should only show if we had subprofits taken). --- freqtrade/rpc/telegram.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/rpc/telegram.py b/freqtrade/rpc/telegram.py index 480a76361..33ccd3b7c 100644 --- a/freqtrade/rpc/telegram.py +++ b/freqtrade/rpc/telegram.py @@ -373,9 +373,9 @@ class Telegram(RPCHandler): f"{msg['profit_extra']})") is_fill = msg['type'] == RPCMessageType.EXIT_FILL - is_final_exit = msg.get('is_final_exit', False) is_sub_trade = msg.get('sub_trade') is_sub_profit = msg['profit_amount'] != msg.get('cumulative_profit') + is_final_exit = msg.get('is_final_exit', False) and is_sub_profit profit_prefix = ('Sub ' if is_sub_profit else 'Cumulative ') if is_sub_trade else '' cp_extra = '' exit_wording = 'Exited' if is_fill else 'Exiting'