This commit is contained in:
Dobromir Popov 2025-02-05 11:24:01 +02:00
parent d29cc312fd
commit c72199400d

View File

@ -409,6 +409,7 @@ def update_live_html(candles, trade_history, epoch, loss, total_pnl):
fig, ax = plt.subplots(figsize=(12, 6))
update_live_chart(ax, candles, trade_history)
epoch_pnl = sum(trade["pnl"] for trade in trade_history)
ax.set_title(f"Epoch {epoch} | Loss: {loss:.4f} | PnL: {epoch_pnl:.2f} | Total PnL: {total_pnl:.2f}")
buf = BytesIO()
fig.savefig(buf, format='png')