mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-09-20 17:41:12 +00:00
Add expectancy and winrate to telegram
This commit is contained in:
parent
6e56f84fe3
commit
4235ab0c7e
|
@ -815,6 +815,9 @@ class Telegram(RPCHandler):
|
||||||
avg_duration = stats['avg_duration']
|
avg_duration = stats['avg_duration']
|
||||||
best_pair = stats['best_pair']
|
best_pair = stats['best_pair']
|
||||||
best_pair_profit_ratio = stats['best_pair_profit_ratio']
|
best_pair_profit_ratio = stats['best_pair_profit_ratio']
|
||||||
|
winrate = stats['winrate']
|
||||||
|
expectancy = stats['expectancy']
|
||||||
|
expectancy_rate = stats['expectancy_rate']
|
||||||
if stats['trade_count'] == 0:
|
if stats['trade_count'] == 0:
|
||||||
markdown_msg = f"No trades yet.\n*Bot started:* `{stats['bot_start_date']}`"
|
markdown_msg = f"No trades yet.\n*Bot started:* `{stats['bot_start_date']}`"
|
||||||
else:
|
else:
|
||||||
|
@ -839,7 +842,9 @@ class Telegram(RPCHandler):
|
||||||
f"*{'First Trade opened' if not timescale else 'Showing Profit since'}:* "
|
f"*{'First Trade opened' if not timescale else 'Showing Profit since'}:* "
|
||||||
f"`{first_trade_date}`\n"
|
f"`{first_trade_date}`\n"
|
||||||
f"*Latest Trade opened:* `{latest_trade_date}`\n"
|
f"*Latest Trade opened:* `{latest_trade_date}`\n"
|
||||||
f"*Win / Loss:* `{stats['winning_trades']} / {stats['losing_trades']}`"
|
f"*Win / Loss:* `{stats['winning_trades']} / {stats['losing_trades']}\n"
|
||||||
|
f"*Winrate:* `({winrate:.2f}%)`\n"
|
||||||
|
f"*Expectancy (Rate):* `{expectancy:.2f} ({expectancy_rate:.2f})`\n"
|
||||||
)
|
)
|
||||||
if stats['closed_trade_count'] > 0:
|
if stats['closed_trade_count'] > 0:
|
||||||
markdown_msg += (
|
markdown_msg += (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user