StackTrading Docs

SRS: UC_4.15.1 — Soft Breach: Daily Loss Limit Hit (LIVE)

UC_4.15.1: Soft Breach — Daily Loss Limit Hit (LIVE)

FieldValue
BA in ChargeHuyen Dinh
Date Created2026-08-18
Versionv1
Document ReferencesRFQ_ Stack Trading Prop Tech V7.pdf (§2.2.A, §2.2.B, §4.2) · Zapier Integration V7.pdf (§Appendix A/B — Table A/B, §Table C — Daily_Loss_Ratio) · QnA_init_docs.md (UC_4.15.1, 8 items)

Architecture note: LIVE Soft Breach shares the identical 3-step sequence (Flatten → Lock → Reset), overlay behaviour, Auth0/dashboard isolation, and CR-13 rounding rule as SIM Soft Breach — UC_4.10.1. The only functional difference is the threshold formula: LIVE uses Market_Loss_When_Stopped (Table A/B, per-level lookup) instead of SIM's flat 7.5% × Notional. Sections identical to SIM reference UC_4.10.1 directly rather than repeating content


Document References

#Original DocumentKey Sections Used
1RFQ_ Stack Trading Prop Tech V7.pdf§2.2.A / §2.2.B (LIVE execution gateway routing — Futures/Forex); §4.2 (Account monitoring)
2Zapier Integration V7.pdf§Appendix A — Table A (Forex Configuration Matrix,Market_Loss_When_Stopped); §Appendix B — Table B (Futures Configuration Matrix, Market_Loss_When_Stopped); §Table C (Daily_Loss_Ratio)
3QnA from clients — STAGE 2/4 DashboardGateway wording (Rithmic Live FCM Gateway (Ironbeam)); 2-layer Forex architecture; MT5 dual-mechanism Lock+Flatten (STAGE2-019)

1. Overview

FieldContent
IDUC_4.15.1
Use CaseSoft Breach — Daily Loss Limit Hit (LIVE)
DescriptionIdentical mechanism toUC_4.10.1 (SIM): (1) The Node.js middleware does not compute this breach itself — it listens to the ACCOUNT_METRICS stream, pushes the Read-Only lock state to the frontend, and fires the DAILY_LIMIT_BREACH WebSocket event. (2) The account auto-unfreezes at the next fixed reset_time (Forex: 16:00 CST, Monday–Friday; Futures: 17:00 CST Exchange Reset). (3) This is a soft pause — account Status does NOT change (remains Active_DMA), POST /fail-challenge is NOT called, no Zapier flow fires. (4) Applies to all LIVE levels including Level 9+ and Founding Mentor (Enforced/Capital-Protection trigger — not bypassed for Founding Mentor).
Zapier FlowN/A
Zapier TableTable A (Forex) / Table B (Futures) —Market_Loss_When_Stopped per level · Table C — Daily_Loss_Ratio (1/3)
3rd PartyRithmic Live FCM Gateway (Ironbeam) 'Suspend Trading' (Futures)MT5 Manager API 'Disable/Read-Only' + C++ MT5 Plugin (Sotatek-built) → flattens positions (Forex, Live Sub Account ST_LIVE_[ID])TraderEvolution Admin API 'Lock/Read-Only' (Forex)

2. Trigger

Execution gateway (Rithmic / MT5 / TraderEvolution) natively evaluates and enforces: Net_P&L ≤ −Daily_Loss_Limit

Formula (LIVE-specific — differs from SIM):

Daily_Loss_Limit = Market_Loss_When_Stopped × Daily_Loss_Ratio (positive value), where:

  • Market_Loss_When_Stopped — looked up from Table A (Forex) or Table B (Futures) by the trader's Current_Level.
  • Daily_Loss_Ratio = 1/3 (Zapier Table C) — same value as SIM.

Worked example (LIVE Level 1, Forex, $25,000 notional tier):

  • Step 1 — Market_Loss_When_Stopped = $1,250 (Table A, Level 1, $25,000 tier)
  • Step 2 — Daily_Loss_Limit: $1,250 × 1/3 = $416.67 (Ref: CR-13) → breach fires when Net_P&L <= −$416.67

Rounding rule, Net P&L definition, and 3-step breach sequence (Flatten → Lock → Reset): identical to SIM — see UC_4.10.1 §2 Trigger. Positions are flattened before lock — zero open positions during soft-lock.

3. Pre-conditions

  • Trader has an active LIVE account (Status = Active_DMA)
  • Middleware maintains a persistent connection to the execution gateway via WebSocket
  • Net_P&L is tracked in real-time via ACCOUNT_METRICS stream (from the execution gateway)

4. Post-conditions

Identical to SIM — see UC_4.10.1 §4 Post-conditions, with the following LIVE-specific substitution:

  • Account Status does NOT change — remains Active_DMA (LIVE equivalent of SIM's Active_SIM). POST /fail-challenge NOT called.
  • Auth0 / dashboard login account is NOT affected — trader can still log in and view dashboard, charts, P&L, journal,... — only the trading/execution account is Read-Only.
  • Reset timing (Forex 16:00 CST Mon–Fri / Futures 17:00 CST Exchange Reset) and the Friday-breach weekend-carryover edge case: identical to SIM, see REF above.

5. Basic Flow

Architecture note: identical to SIM — Daily Loss Limit is calculated and enforced natively by the execution gateway (Rithmic / MT5 / TraderEvolution), not by middleware. Middleware only relays state to the frontend via WebSocket; not routed through Zapier.

Step 1 — Real-time P&L monitoring: identical to SIM, see UC_4.10.1 §5 Basic Flow — Step 1.

Step 2 — Breach detected → 3-step sequence (Flatten → Lock → Reset): identical structure to SIM — see BR_4.15.1.3 for the LIVE-specific gateway mechanism.

Step 3 — Fire WebSocket event:

Middleware emits DAILY_LIMIT_BREACH to the frontend (identical payload shape to SIM):

FieldTypeDescription
eventstring"DAILY_STOP"
current_lossfloatCurrent Net P&L at breach (negative float)
daily_loss_limitfloatDaily Loss Limit threshold (negative float)
reset_timestringNext fixedreset_time for trader's asset class:• Forex: "16:00 CST" (17:00 EST), Monday–Friday• Futures: "17:00 CST" Exchange Reset

Step 4 — Frontend renders "Daily Limit Reached" overlay: identical to SIM, see BR_4.10.1.1 and §9.1.

Step 5 — Reset time reached → Automatic unlock: identical to SIM, see UC_4.10.1 §5 Basic Flow — Step 5.

6. Alternative Flow

Identical to SIM — see UC_4.10.1 §6 Alternative Flow (breach occurring within seconds of the fixed reset_time).

7. Exceptional Flow

Identical to SIM — see UC_4.10.1 §7 Exceptional Flow (market halt during soft lock does not affect the fixed reset_time).

8. Business Rules

BR_4.15.1.1: Soft Lock Overlay — Temporary Until Reset Time

Identical to SIM — see BR_4.10.1.1. No LIVE-specific difference.

BR_4.15.1.2: Account Isolation — Single Asset Class Per Account

Identical to SIM — see BR_4.10.1.2. No LIVE-specific difference.

BR_4.15.1.3: Execution Gateway — Flatten Mechanism (LIVE)

LIVE-specific mechanism, cross-referencing SIM's BR_4.10.1.4. Renumbered as BR_4.15.1.3 (sequential within UC_4.15.1) rather than kept in sync with SIM's numbering.

  • When Daily Loss Limit is breached, all open positions are force-closed at market, all working orders cancelled. No retry.
  • Futures — Rithmic (LIVE):
    • 'Suspend Trading' via Rithmic Live FCM Gateway (Ironbeam)
  • Forex — MT5 (LIVE):
    • API: MT5 Manager API 'Disable/Read-Only'
    • Flatten: C++ MT5 Plugin (Sotatek-built) → flattens positions on the Live Sub Account (ST_LIVE_[ID], routed via YourBourse Bridge, settled at the Omnibus corporate account — Forex.com/Interactive Brokers). Lock (Disable/Read-Only) and Flatten (C++ MT5 Plugin) are 2 separate mechanisms — Disable/Read-Only alone only blocks new orders, it does NOT force-close open positions.
  • Forex — TraderEvolution (LIVE):
    • TraderEvolution Admin API 'Lock/Read-Only'

BR_4.15.1.4: Hard Breach Supersedes Soft Breach

Identical to SIM — see BR_4.10.1.5, substituting the LIVE Hard Breach threshold Market_Loss_When_Stopped (Ref: UC_4.15.2) for SIM's Absolute_Stop_Loss. If both Daily_Loss_Limit AND the Hard Breach threshold are crossed simultaneously, emit ONLY LEVEL_STOP_BREACH; DAILY_LIMIT_BREACH is suppressed. Daily Loss Limit alone never terminates an account. Applies to all levels including Level 9+ and Founding Mentor.

9. Screen Description and Business Rules

9.1 Soft Breach Overlay

Identical to SIM — same wireframe, same overlay copy, same field behaviour. See UC_4.10.1 §9.1 (wireframe: Soft breach modal.png — shared between SIM and LIVE, no separate LIVE-specific wireframe exists).


Changelog

DateVersionUpdated itemBeforeAfterNotes
2026-08-18v1Initial creationFull SRS with 4 BRs (BR_4.15.1.1, .2, .4, .5), Overview, Trigger, Pre-conditions, Post-conditions, Basic/Alternative/Exceptional Flow, Screen DescriptionAuthored per Init Flow Step 3 (Architect), sourced from QnA_init_docs.md (8 BA-confirmed items, 2026-08-18) and BA directive: LIVE Soft Lock shares identical architecture withUC_4.10.1 (SIM) — content identical to SIM is referenced via anchor link, not duplicated; only the threshold formula (Market_Loss_When_Stopped × Daily_Loss_Ratio, Table A/B) and LIVE gateway naming are written out in full.

On this page