mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
fix: improved realized profit telegram condition
This commit is contained in:
@@ -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']})`"
|
||||
|
||||
Reference in New Issue
Block a user