fix: improved realized profit telegram condition

This commit is contained in:
Matthias
2025-11-23 13:23:18 +01:00
parent 972e25a6a7
commit 7edc2e8c94

View File

@@ -806,7 +806,10 @@ class Telegram(RPCHandler):
)
if r["is_open"]:
if r.get("realized_profit") is not None:
if (
r.get("realized_profit") is not None
and r.get("realized_profit_ratio") is not None
):
lines.append(
f"*Realized Profit:* `{format_pct(r['realized_profit_ratio'])} "
f"({r['realized_profit_r']})`"