SRS: UC_4.8.1 — PnL Gauge (SIM Overview)
| Field | Value |
|---|---|
| BA in Charge | Trang Nguyen |
| Date Created | 2026-08-10 |
| Version | v1.4 |
| Document References | RFQ_ Website and Dashboard Implementation V7.pdf (§Part C: Trader Dashboard Implementation, Key Features) · RFQ_ Stack Trading Prop Tech V7.pdf (§3.2 Calculations and Endpoints for our Dashboard, §Reference Data Endpoints — Current Level Detail) ·docs/BA/UC_4.1-4.17/dashboard_sim/UC_4.8.1/QnA_init_docs.md (QN-4.8.1-01..05) |
UC_4.8.1 — PnL Gauge
1. Overview
| Field | Content |
|---|---|
| ID | UC_4.8.1 |
| Use Case | PnL Gauge |
| Description | A prominent streaming risk/reward dial on the SIM Overview screen — spanning from the trader's Hard Stop Loss threshold (left end) to their Profit Target (right end), with a live needle showing current Net PnL. Requires explicit frontend state management for 4 visual states (Starting point, Drawdown defense enabled, Breached/Account Disabled, Level Up), though "Drawdown defense enabled" never triggers on SIM (Ref:BR_4.8.1.1). Two persistent text labels beside the dial change content per state (Ref: BR_4.8.1.4). |
| Zapier Flow | — |
| Zapier Table | — |
| 3rd Party | — |
References/Wireframe/Stage 2/Dashboard/Dashboard.png PnL Gauge, "Starting point" state, populated.
References/Wireframe/Stage 2/Dashboard/Dashboard - Day 0.png PnL Gauge, "Starting point" state, empty (Day 0, no trades yet).
References/Wireframe/Stage 2/Dashboard/Level Up.png PnL Gauge, "Level Up" state.
References/Wireframe/Stage 2/Dashboard/Drawdown defense (level 9+).png PnL Gauge, "Drawdown defense enabled" state (LIVE reference only — N/A on SIM, Ref: BR_4.8.1.1).
References/Wireframe/Stage 2/Dashboard/Dashboard - Hard breach (T+0 - T+10).png PnL Gauge, "Breached (Account Disabled)" state, with the rest of the Overview screen desaturated (Frosted Glass).
🎬 Motion reference: PnL Gauge state-transition animations (Google Drive)
2. Trigger
- The Overview screen (Ref: UC_4.1.1) has rendered.
- An
ACCOUNT_METRICSWebSocket event arrives while the user is on the Overview screen (Ref: BR_4.8.1.3). - A
LEVEL_STOP_BREACHorLEVEL_PROMOTIONWebSocket event arrives (Ref: BR_4.8.1.1).
3. Pre-conditions
- User is on the Overview screen (Ref: UC_4.1.1 §1 Overview) with an active SIM account.
4. Post-conditions
- The dial displays the trader's current risk/reward position (Hard Stop Loss ↔ Profit Target, needle at current Net PnL) and continues to update live for the remainder of the session.
5. Basic Flow
- On Overview screen load, frontend calls
GET /current-level-detail, which returns the trader'sMarket_Loss_When_Stopped(Hard Stop Loss threshold) andProfit_Target(Ref: BR_4.8.1.2). - Frontend renders the dial scale: left end (minimum) =
-Market_Loss_When_Stopped, right end (maximum) =+Profit_Target(Ref: BR_4.8.1.2), and the two per-state labels beside the dial (Ref: BR_4.8.1.4). - Frontend subscribes to the
ACCOUNT_METRICSWebSocket channel; on each update, the needle position and the live dollar value below it are set to the current Net PnL (Unrealized + Realized, equivalently equity −allocated_capital) (Ref: BR_4.8.1.3). - [If a
LEVEL_STOP_BREACHevent arrives] the dial transitions to the "Breached (Account Disabled)" state (Ref: BR_4.8.1.1, BR_4.8.1.5). - [If a
LEVEL_PROMOTIONevent arrives] the dial transitions to the "Level Up" state (Ref: BR_4.8.1.1, BR_4.8.1.4).
6. Exceptional Flow
- WebSocket/API connection drops: the dial retains its last-known values (stale data) while the client applies exponential backoff and automatically reconnects, per the shared WebSocket reconnection resiliency rule (CR-14).
- Shadow Mode (Passing Associate Track, awaiting Live provisioning): the gauge remains active and continues to display the live dial/needle, in a Read-Only mode (Source: RFQ_ Website and Dashboard Implementation V7.pdf, "PnL Gauge is active since it shows them the timer").
7. Business Rules
BR_4.8.1.1: Four Dial States — "Drawdown Defense Enabled" is N/A on SIM
The dial requires frontend state management for 4 distinct visual states: Starting point, Drawdown defense enabled, Breached (Account Disabled), and Level Up (Source: RFQ_ Website and Dashboard Implementation V7.pdf §Part C, "PnL Gauge"; visual reference: wireframes listed in Section 1).
The "Drawdown defense enabled" state is listed here for structural completeness with the source, but never triggers on SIM — the underlying Defense Protocol (48h cooling-off, Table F) applies only to Level 9+ traders on LIVE (Ref: UC_4.14.4, LIVE, not yet documented in this repo). SIM has only a single active tier (Level 0 — evaluation, binary pass/fail) with no Defense Protocol equivalent in the WBS Failure & Recovery module (Ref: UC_4.9.1–UC_4.9.4). This state is N/A for SIM — it only applies once the trader has been promoted to LIVE (Source: BA confirmation, 2026-08-10, QnA_init_docs.md QN-4.8.1-01).
BR_4.8.1.2: Dial Scale — Hard Stop Loss to Profit Target
On load, frontend calls GET /current-level-detail, which returns the trader's Market_Loss_When_Stopped and Profit_Target for their current level (Source: BA confirmation, 2026-08-10, QnA_init_docs.md QN-4.8.1-03):
- Left end (minimum):
−Market_Loss_When_Stopped(Hard Stop Loss threshold). Example: Stop = $1,250 → left end = −$1,250. - Right end (maximum):
+Profit_Target. Example: Target = $1,875 → right end = +$1,875.
Arc rendering/scaling mechanics for these two endpoints (physical zero anchor, dual-domain needle mapping, tick marks, absolute end labels) are defined in BR_4.8.1.6, not repeated here.
BR_4.8.1.3: Needle — Live Net PnL, Always Reflects Actual Current-Level Data
The needle position, and the live dollar value displayed below it, both track the trader's actual current Net PnL for their current level — Unrealized PnL + Realized PnL, equivalently equity − allocated_capital (the starting capital allocated for the current level). This is a real-data requirement, not merely a "last event received" display: the value shown must at all times equal the trader's true current Net PnL for that level, regardless of whether a new position was just opened/closed or not — it is never a placeholder, a zeroed default, or a value that only updates when something changes.
- While the trader is actively on the Overview screen: the value streams live over the
ACCOUNT_METRICSWebSocket channel (Source: BA confirmation, 2026-08-10,QnA_init_docs.mdQN-4.8.1-03; event throttle: RFQ_ Stack Trading Prop Tech V7.pdf §3.2,ACCOUNT_METRICS, 1000ms). - On landing/re-landing on the Overview screen (fresh page load, F5/hard reload, or a trade closes without producing a visibly distinct WS fluctuation): the needle and dollar value must still show the trader's real, correct current Net PnL immediately — even though no new
ACCOUNT_METRICSevent or new position has yet been pushed over the socket to trigger a visual update. The display is never allowed to sit blank, stale-to-zero, or otherwise out of sync with the actual current-level figures while waiting on the next tick.
BR_4.8.1.4: Per-State Left/Right Labels
Two persistent text labels sit beside the dial — bottom-left and bottom-right — and change content depending on the active state (Ref: BR_4.8.1.1) (Source: wireframes listed in Section 1):
- Starting point: Left =
"Stop Loss Breach"heading +"Defense unlocked at Lvl. 9"sub-line (a static reminder of the LIVE-only Defense Protocol unlock level, shown even though N/A on SIM). Right ="Promotion: Level [N]"+"Est. Bonus $[amount]"—[N]is the next level (current level + 1) and[amount]is that level'sBonus_Paid_To_Trader, both looked up directly from Table A (Forex) / Table B (Futures), per the trader's asset class, for the next level (same next-level concept as the Level Progression widget, Ref: UC_4.8.2 §BR_4.8.2.2). This is a direct table lookup value — no tooltip is shown for either the next-level number or the bonus amount (Source: BA confirmation). - Level Up: Right label changes to
"Level [N] Unlocked!"+"$[amount] Bonus Transmitting". Left label unchanged. - Breached (Account Disabled): Left label changes to
"Stop Loss Breached"+"Account Disabled". Right label's value visually de-emphasizes (promotion no longer applicable this cycle) — exact interaction rule pending confirmation.
BR_4.8.1.5: Breached (Account Disabled) State — Display Only, Backend Flow Owned Elsewhere
When a LEVEL_STOP_BREACH event is received, the dial transitions to the "Breached (Account Disabled)" state — needle locked at the bottom/left, left label per BR_4.8.1.4. Per wireframe, the rest of the Overview screen (Position Monitor, The Pulse, Equity Curve, Profit Factor, Win Rate, The Desk Manager, Level Progression) turns desaturated (Frosted Glass) while the PnL Gauge itself remains in normal focus, as the primary indicator of the breach. This UC describes only the gauge's display behavior at this state; the full backend flow (Atomic Kill Switch, position flattening, account lock, Frosted Glass full-page effect) is owned by UC_4.9.2 — Hard Breach, Level Stop and is not repeated here.
BR_4.8.1.6: Center Value Precision & Dual-Domain Arc Rendering (reused verbatim by LIVE, Ref: UC_4.12.2 BR_4.12.2.2)
Governs how the arc built from the two endpoints in BR_4.8.1.2 is rendered, and how the live center value from BR_4.8.1.3 is formatted. This rule is UI-rendering scope only — it does not change either endpoint's underlying value or the needle's real-data correctness requirement (BR_4.8.1.3).
- Full precision (whole dollars), no abbreviation: the center Net PnL value is shown as the exact dollar amount with comma thousands separators, cents omitted (e.g.
$1,875, not$1,875.00). Abbreviated notation (1.8K,1M) is never used, regardless of magnitude. This is a deliberate exception to CR-11 (which mandates 2 decimal places) — CR-11's decimal-display rule does not apply to this one field; CR-11's thousands-separator and hover-tooltip (full value) rules still apply. - Dynamic font scaling: if the formatted value (up to 7 digits) overflows the center display's container, the frontend shrinks the text via CSS scaling, down to a floor of 50% of its original size, to fit within container bounds.
- Physical zero anchor & color split: the
$0mark is always rendered at the exact physical (visual) center of the gauge arc, regardless of the data-value asymmetry between the two endpoints (Profit Target and Hard Stop Loss are not equal magnitudes — Ref: BR_4.8.1.2). The red (loss) zone and green (profit) zone meet exactly at this physical center point — the color split is a rendering/visual boundary, not a data-value boundary. - Dual-domain needle mapping: because the two endpoints are asymmetric in magnitude while
$0is fixed at the physical center, the needle position cannot use one single linear scale across the whole arc. The frontend calculates needle position using two separate interpolation domains:- Negative Net PnL
[−Market_Loss_When_Stopped, 0]maps onto the left half of the arc[leftmost point, center]. - Positive Net PnL
[0, +Profit_Target]maps onto the right half of the arc[center, rightmost point]. Each half has its own dollars-per-degree (or dollars-per-pixel) rate — the two halves are not proportionally equivalent.
- Negative Net PnL
- Dynamic tick rendering: by default, 4 inner tick marks render on the right (profit) side, with proportionally fewer on the left (loss) side, using clean interval rounding (nearest hundred or thousand). If tick-label character counts crowd the arc at higher funding levels, the frontend reduces to 3 inner tick marks per side to preserve readability.
- Absolute bounds: the rightmost label on the arc always displays the exact current
Profit_Target; the leftmost label always displays the exact currentMarket_Loss_When_Stopped— both full precision, never rounded or abbreviated (same formatting as point 1).
(Source: Client description, relayed by user, BA session, 2026-08-31.)
8. Screen Description
| No. | Field Name | Field Type | Displaying rule / Behaviour rule |
|---|---|---|---|
| 1 | PnL dial | Label | Displaying rule:- Gauge scale from −Market_Loss_When_Stopped (left) to +Profit_Target (right), both full precision, no abbreviation. 4 states per BR_4.8.1.1; "Drawdown defense enabled" N/A for SIM. Ref: BR_4.8.1.2. Physical $0 anchor + color split, dual-domain needle mapping, dynamic tick rendering (4 → 3 per side), absolute end-label bounds — Ref: BR_4.8.1.6.Behaviour rule:- Read-only. State transitions are animated — Ref: motion reference, Section 1. |
| 2 | Needle | Label | Displaying rule:- Position tracks current Net PnL along the dial scale, using the two separate interpolation domains (negative half / positive half) defined in BR_4.8.1.6. Ref: BR_4.8.1.3.Behaviour rule:- Read-only. Updates live via ACCOUNT_METRICS. |
| 3 | Net PnL value | Label | Displaying rule:- Live dollar amount below the needle, equal to Unrealized + Realized PnL. Full precision (whole dollars, comma separators, no abbreviation), dynamic font scaling down to 50% on overflow — Ref: BR_4.8.1.6 (exception to CR-11's 2-decimal rule; CR-11's separator/tooltip rules still apply). Ref: BR_4.8.1.3.Behaviour rule:- Read-only. Updates live via ACCOUNT_METRICS. |
| 4 | State label (left) | Label | Displaying rule:- 2-line label, content per state per BR_4.8.1.4. . |
| 5 | State label (right) | Label | Displaying rule:- 2-line label, content per state per BR_4.8.1.4. Next-level number and bonus amount are direct lookups from Table A/B (per current asset class) for the next level — displayed as-is, no tooltip shown for either value. Monetary value display for the bonus line: Ref: CR-11. |
Changelog
| Date | Version | Updated item | Before | After | Notes |
|---|---|---|---|---|---|
| 2026-08-28 | v1 → v1.1 | BR_4.8.1.3 — added always-populated requirement for F5/reload and quiet trade-close cases | BR_4.8.1.3 described only the ongoing live-streamed behavior of the needle/dollar value viaACCOUNT_METRICS — no note covering what the widget shows on a fresh page load/reload, or after a trade closes without a visibly fluctuating WS tick. | Added a note requiring the Net PnL value to always show a populated, current figure on access — covering (a) F5/hard reload and (b) a trade close that doesn't produce a visible WS fluctuation. ⚠️ Flagged pending client confirmation: no source documents an "immediate push on subscribe" behavior forACCOUNT_METRICS, nor a REST snapshot endpoint for live PnL — two candidate mechanisms (immediate-push-on-subscribe vs. frontend-side last-value persistence) are noted as unconfirmed options, not asserted fact. | Source: BA direct instruction, 2026-08-28. |
| 2026-08-28 | v1.1 → v1.2 | BR_4.8.1.3 — reframed as a real-data correctness rule, not just an on-access display note | Rule title was "Needle — Live Net PnL"; the always-populated note was phrased as a display/UX requirement for the F5/reload and quiet-trade-close cases specifically. | Rule retitled "Needle — Live Net PnL, Always Reflects Actual Current-Level Data." Rewrote the rule to state plainly that the needle/dollar value must always equal the trader's actual current Net PnL for their current level — whether or not a new position was just opened/closed, and whether or not a freshACCOUNT_METRICS event or position update has been pushed over the socket. The F5/reload and quiet-trade-close cases are kept as call-outs of this same underlying rule rather than a separate note. The ⚠️ pending-client-confirmation flag on the exact seeding mechanism (immediate-push-on-subscribe vs. frontend-side persistence) is retained, now explicitly stated to still need to resolve to the real current-level figure, not a stale/incorrect cached one. | Source: BA direct instruction, 2026-08-28. |
| 2026-08-28 | v1.2 → v1.3 | BR_4.8.1.3 — removed the two candidate-mechanism proposals from the pending-confirmation note | The ⚠️ note proposed two specific candidate implementations (immediate-push-on-subscribe viaACCOUNT_METRICS, or frontend-side last-value persistence/rehydration) as ways to satisfy the always-correct-on-access rule, while flagging neither as confirmed. | Removed both candidate-mechanism proposals — no client source describes any implementation mechanism for this behavior. The note now states only that this UC defines the required outcome (Net PnL must always be correct on access) and leaves the implementation approach to Engineering, without proposing or asserting any specific mechanism. | Source: BA direct instruction, 2026-08-28 — doc should not describe a mechanism the source material doesn't contain. |
| 2026-08-31 | v1.3 → v1.4 | New BR_4.8.1.6 — center value precision & dual-domain arc rendering; BR_4.8.1.2 and Screen Description rows 1-3 cross-ref it | No rule governed arc/needle rendering mechanics or center-value number formatting — CR-11 (2-decimal display) applied by default to the Net PnL value with no documented exception; needle mapping and tick rendering were unspecified. | Added BR_4.8.1.6, covering: (1) full-precision whole-dollar display for the center Net PnL value, no abbreviation, explicit CR-11 decimal-rule exception; (2) dynamic font scaling down to 50% on overflow; (3) physical $0 anchor at arc center with the red/green color split at that same physical point (independent of the two endpoints' asymmetric magnitudes); (4) dual-domain needle interpolation (separate negative/positive scales); (5) dynamic tick rendering (4 → 3 per side under crowding); (6) absolute end-label bounds (exact Profit_Target/Market_Loss_When_Stopped, never rounded/abbreviated). Reused verbatim by LIVE (Ref: UC_4.12.2 BR_4.12.2.2). | Source: Client description, relayed by user, BA session, 2026-08-31. |