fix: Format dates for plotly chart in trade history plot
This commit is contained in:
parent
595fb94e97
commit
c802bc0584
@ -172,7 +172,7 @@ def plot_trade_history(trades):
|
|||||||
trade_pnl = (price - avg_entry_price) * shares
|
trade_pnl = (price - avg_entry_price) * shares
|
||||||
cumulative_pnl += trade_pnl
|
cumulative_pnl += trade_pnl
|
||||||
|
|
||||||
dates.append(date)
|
dates.append(date.strftime('%Y-%m-%d %H:%M:%S'))
|
||||||
pnl.append(cumulative_pnl)
|
pnl.append(cumulative_pnl)
|
||||||
|
|
||||||
except (ValueError, TypeError) as e:
|
except (ValueError, TypeError) as e:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user