mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 00:23:07 +00:00
Fix telegram profit stats when fiat_display_currency is not set
This commit is contained in:
@@ -1044,12 +1044,15 @@ class Telegram(RPCHandler):
|
||||
else:
|
||||
# Message to display
|
||||
if stats["closed_trade_count"] > 0:
|
||||
fiat_closed_trades = (
|
||||
f"∙ `{fmt_coin(profit_closed_fiat, fiat_disp_cur)}`\n" if fiat_disp_cur else ""
|
||||
)
|
||||
markdown_msg = (
|
||||
"*ROI:* Closed trades\n"
|
||||
f"∙ `{fmt_coin(profit_closed_coin, stake_cur)} "
|
||||
f"({profit_closed_ratio_mean:.2%}) "
|
||||
f"({profit_closed_percent} \N{GREEK CAPITAL LETTER SIGMA}%)`\n"
|
||||
f"∙ `{fmt_coin(profit_closed_fiat, fiat_disp_cur)}`\n"
|
||||
f"{fiat_closed_trades}"
|
||||
)
|
||||
else:
|
||||
markdown_msg = "`No closed trade` \n"
|
||||
|
||||
Reference in New Issue
Block a user