Show fund transactions (W/D) on calendar, equity curve, and cash history table

- Persist fund transactions to SQLite (fund_transactions table) so they
  survive beyond Tradovate's 28-day report window
- Calendar: highlight W/D dates in amber with the amount shown below the day
- Equity curve: reduce running equity at withdrawal dates and show a vertical
  dashed amber line labelled W/D
- New Cash History table below calendar listing all trades and W/D events
  sorted newest-first

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-03-21 04:16:24 -05:00
co-authored by Claude Sonnet 4.6
parent 6d960ceb7b
commit 4252adfbea
5 changed files with 144 additions and 18 deletions
+2
View File
@@ -36,6 +36,8 @@ export interface AccountState {
dailyTarget: { amount: number; path: 'first_day' | 'normal_day' | 'reduced_day' } | null;
/** FIFO daily P&L history — used by the equity curve and calendar. */
dailyPnL: { date: string; pnl: number }[];
/** Fund transactions (deposits/withdrawals) — used by the calendar and equity curve. */
fundTransactions: { date: string; amount: number }[];
}
export interface FirmState {