Show stage-aware + consistency-adjusted profit target on dashboards

State API now returns effectiveProfitTarget = max(stage profit target,
maxDay/consistency). When a big day forces the consistency rule, this
reflects the actual amount needed to complete the stage — not just the
base profit target.

Main dashboard and account detail page now display this instead of the
raw cfg.profitTarget.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Brandon Li
2026-04-24 02:20:11 -05:00
co-authored by Claude Opus 4.6
parent 9928f1cabd
commit 8204cd138b
4 changed files with 16 additions and 3 deletions
+2
View File
@@ -36,6 +36,8 @@ export interface AccountState {
targetHit: boolean;
/** Next trading day's target, computed server-side. null when account is dead or config is missing. */
dailyTarget: { amount: number; path: 'first_day' | 'normal_day' | 'reduced_day' } | null;
/** Actual profit target to hit — max(stage profit target, consistency realTarget = maxDay/consistency). */
effectiveProfitTarget: number | null;
/** Current cycle daily P&L — used for target calculations. */
dailyPnL: { date: string; pnl: number }[];
/** Full P&L history across all cycles — used for calendar and equity curve display. */