fix: Format dates for plotly chart in trade history plot

This commit is contained in:
Bobby (aider) 2025-02-19 20:37:33 -08:00
parent 595fb94e97
commit c802bc0584

View File

@ -172,7 +172,7 @@ def plot_trade_history(trades):
trade_pnl = (price - avg_entry_price) * shares
cumulative_pnl += trade_pnl
dates.append(date)
dates.append(date.strftime('%Y-%m-%d %H:%M:%S'))
pnl.append(cumulative_pnl)
except (ValueError, TypeError) as e: