- NT8StrategyBase.cs: made reject summary snapshots ORB-window/date-aware with heartbeat flush - SimpleORBNT8.cs: bound summary suppression to configured opening range - tests: added reject summary source guards and SimpleORB no-breakout rejection coverage - SPRINT_BOARD.md: marked GAP-060 implemented with deploy blocker - docs/00-governance/decisions.md: recorded DEC-20260823-08 implementation evidence Build: clean | Tests: 543 passing | Dual-deployed: no - NinjaTrader.exe PID 18800 locked NT8.Core.dll
194 lines
20 KiB
Markdown
194 lines
20 KiB
Markdown
# NT8 SDK — Sprint Board
|
||
**Last Updated:** 2026-08-18 (v7.0 review — six new tasks staged)
|
||
**Truth source:** compiler output, test output, deployed-file comparisons, and runtime artifacts override board claims.
|
||
|
||
## Current gate state
|
||
|
||
| Area | State | Evidence / required next step |
|
||
|---|---|---|
|
||
| Core source build | ✅ | `dotnet test NT8-SDK.sln --configuration Release --verbosity minimal`: build succeeded. |
|
||
| Automated tests | ✅ | 511 passed: 422 Core, 79 Integration, 10 Performance. |
|
||
| Provenance | ✅ | Gate 3 fix serializes grade, score, submitted runner mode, and ORB ticks from the accepted intent/submission data. |
|
||
| Scenario coverage | 🟡 | 5/8 genuine assertions; 3 explicitly deferred for missing seams. |
|
||
| Gate Run #2 | ❌ | Contaminated; provenance defects were identified after the run. |
|
||
| Gate Run #3 | ⏳ | Working tree clean; freeze capture succeeded: `docs/gate-runs/gate3/baseline.json` from `freeze_20260816_170304`; `DEC-GATE3-CONFIG.md` regenerated and still `draft` pending GAP-034. Complete manual NinjaScript compile/re-arm before starting the clock. |
|
||
|
||
> **Gate deployment rule:** Once RB-4.1 is recorded and Gate Run #2 begins, do not dual-deploy to the gate machine. Run GAP-025 and connection-seam work in branches only.
|
||
|
||
---
|
||
|
||
## 🔴 BLOCKERS — staged 2026-08-18 by the v7.0 master-document review
|
||
|
||
> Source: `docs/NT8_SDK_Master_Document_v7.0_Complete.docx` (+ `docs/NT8_SDK_v7.0_Visual_Pack.html`).
|
||
> All six were found by cross-referencing source against the live NinjaTrader log directory.
|
||
> **No source code was changed by the review** — each item below is a staged prompt awaiting execution.
|
||
> **2026-08-19: all four proposed decisions accepted by operator (DEC-20260818-18/19/20/21, plus new DEC-20260819-01 on MNQ cutover sequencing). All six items below marked ✅ READY.**
|
||
> **2026-08-19, later same day: 🛑 PREFLIGHT HALTED by operator before GAP-054 start.** `git status` showed uncommitted `src/` changes, NinjaTrader was running, position status was unconfirmed, and the configured account logged itself as `"gate account SimSimple ORB"`.
|
||
> **2026-08-19, still later: 🟡 PARTIALLY CLEARED.** Operator confirmed: position flat, NinjaTrader closed, and `SimSimple ORB` is "not of consequence" — a new account with `gate3` explicitly in its name will be stood up for actual Gate Run #3 evidence. **One item still open: the uncommitted DASH-002 diff in `src/` (`NT8StrategyBase.cs`, `SimpleORBNT8.cs`) has not been committed or otherwise reconciled** — recommended before GAP-054 lands on top of it. Full detail: `docs/00-governance/current_status.md` § 2026-08-19.
|
||
> **2026-08-21: GAP-054 Option 0 IMPLEMENTED and source-verified.** Landed on top of the still-uncommitted DASH-002 diff (unresolved from the line above). Builds/tests/deploy all passed; deployed hash matches repo. **Not yet SIM-validated, not yet committed, not yet cleared for RUNNER-001.** New low-priority follow-ups logged: GAP-056 (breakeven params now fully inert, not just runner-scoped as this board previously assumed) and GAP-057 (no test seam for NT8 managed SetStopLoss/SetTrailStop calls). See DEC-20260818-18 and DEC-20260821-01.
|
||
|
||
**[GAP-054] Auto-breakeven destroys the runner's trailing stop** | Stage 2 | 🟡 IMPLEMENTED, UNVALIDATED — **still blocks RUNNER-001**
|
||
- `SetStopLoss()` on `_runnerSignalName` (`NT8StrategyBase.cs` ~803) replaces the `SetTrailStop()` issued at entry (~2188/2196). Mutually exclusive per signal name in NinjaScript.
|
||
- Confirmed in 4/4 broker-confirmed trades: trail was 12–16 ticks in profit when breakeven fired, moved back to +1. **The runner has never trailed.**
|
||
- Conservative floor estimate: 55 ticks (~$275 gross / ~$252 net) forgone vs $25 / $1.96 realised — ≈24% of total P&L.
|
||
- Supersedes the "retune the breakeven trigger" framing of DEC-20260810-02 and DEC-20260815-01.
|
||
- Prompt: `TASK_GAP054_RUNNER_TRAIL_PROMPT.md` (updated 2026-08-19: unconditional-skip default resolved, no new flag). Validate on SIM/replay only before any live gate run.
|
||
|
||
**[GAP-045 / GAP-046] Risk-envelope coherence guards** | Stage 0/1 | ✅ IMPLEMENTED — deployed 2026-08-23
|
||
- GAP-045: `MaxStopTicks` 50 × $5 = $250 > `MaxTradeRisk` $200 on NQ. Five valid signals rejected 2026-08-18 10:10 ET at $225.00. The top 20% of the ATR stop range is unreachable.
|
||
- GAP-046: `EnableTrailingDrawdown=True` with `AccountStartingBalance=$0.00` blocked every entry from 14:30 ET, 27 rejections. No startup assertion pairs the two.
|
||
- GAP-050: `MaxTradeRisk` has no quantity term — worst case is $600 against a $1,000 daily limit. v6.4 §3.2 documented a `× Qty` the code has never had.
|
||
- **Decided 2026-08-19:** collision resolved via MNQ (staged separately, DEC-20260819-01); MaxTradeRisk is per-position (total). Tier 1 check reorders to post-sizing. Implement and validate on NQ first — MNQ cutover is a later, separate step.
|
||
- Prompt: `TASK_GAP045_GAP046_RISK_GUARDS_PROMPT.md` (Part 3 rewritten 2026-08-19, now fully actionable). Verification: `verify-build.bat` 535/535, Core Release no-build 446/446, deploy backup `20260823_144817`. Manual NT8 compile and NQ SIM validation still required; MNQ cutover remains separate.
|
||
|
||
**[GAP-047] Confluence factor weights pre-populated to 1.0** | Stage 1 | ✅ PART 2 IMPLEMENTED — fresh freeze required
|
||
- `ConfluenceScorer.cs` ~108–117 / ~410–419: the calculators' designed weights (0.20/0.15/0.15/0.20/0.15) are unreachable dead code. Every `STATE:` factor reads `x1.00`.
|
||
- Designed total weight 5.85 vs actual 10.00. Grade A reachable on factors 1–5 alone under the design; close to structurally unreachable under equal weights.
|
||
- Live example: 0.640 (C) as logged vs 0.727 (B) under designed weights. **Leading hypothesis for GAP-034a and for the low trade rate.**
|
||
- Part 1 (offline study) complete 2026-08-23: `TASK_GAP047_WEIGHT_RESCORE_PROMPT.md`, evidence `tools/rescore/GAP-047_weight_rescore_output.md`/`.json`, commit `cbf45df`.
|
||
- **Part 2 implemented 2026-08-23 (DEC-20260823-01):** replaced the five wrong `1.0` literals with the designed values. Composite normalization already correct (dynamic `weightedScoreSum/totalWeight`) — verified, unchanged. No SIM trade required to validate; fully tested in `NT8.Core`.
|
||
- Prompt: `TASK_GAP047_PART2_WEIGHT_RUNTIME_PROMPT.md`. Verification: `verify-build.bat` 514/514, Core Release no-build 425/425, deploy backup `20260823_135331`. Fresh gate config freeze needed before any gate evidence collected after this lands.
|
||
|
||
**[GAP-055] `MaxDailyTrades` does not survive a strategy restart** | Stage 0 | ✅ IMPLEMENTED — deployed 2026-08-23
|
||
- In-memory counter only (`SimpleORBStrategy.cs` ~39). CME trading date 2026-08-17 took two trades under `MaxDailyTrades=1` across two NT8 sessions; the second session's `DayPnL=$271.96 → $545.44` proves NT8 treated them as one day.
|
||
- Same class as the 7/28 breach that helped void Gate Run #2. **A gate run cannot currently guarantee its own cap.**
|
||
- Prompt: `TASK_GAP055_MAXDAILYTRADES_PERSIST_PROMPT.md`. Verification: `verify-build.bat` 521/521, Core Release no-build 432/432, deploy backup `20260823_143311`. Manual NT8 compile and SIM restart validation still required.
|
||
|
||
**[GAP-048] Reject-reason taxonomy conflates four causes under `KillSwitch`** | Stage 0 | ✅ IMPLEMENTED — deployed 2026-08-23
|
||
- 2026-08-17 logged `reason=KillSwitch count=647` from a real kill switch; 2026-08-18 logged `count=5` from `MaxTradeRisk`. Same label. `GradeFilter` is overloaded four ways as well.
|
||
- `REJECT SUMMARY` aggregates on `reason`, so the counts operators and the dashboard read are ambiguous. Defeats what GAP-035 was built for.
|
||
- Prompt: `TASK_GAP048_REJECT_TAXONOMY_PROMPT.md`. Verification: `verify-build.bat` 516/516, Core Release no-build 427/427, parser syntax checks passed, deploy backup `20260823_142014`. Manual NT8 compile and live/SIM dashboard spot-check still required.
|
||
- GAP-058 housekeeping implemented 2026-08-23: replaced the tautological reject-line format test with production-path coverage; no production code changed.
|
||
|
||
**[GAP-049] Telemetry `STATE:` score is direction-incorrect and presented as the trade grade** | Stage 1 | ✅ IMPLEMENTED — deployed 2026-08-23
|
||
- `GapDirectionAlignmentCalculator` reads `daily.TradeDirection`, which the telemetry path deliberately does not set (DEC-20260818-06). Confirmed: a −523 gap scored "opposes trade" on a `Direction=Sell` setup.
|
||
- The dashboard's headline Score/Grade is therefore not the trade's. Also degrades the GAP-047 study.
|
||
- Prompt: `TASK_GAP049_TELEMETRY_DIRECTION_PROMPT.md`. Telemetry now clones `DailyBarContext`, sets clone-only direction/session-open/volume fields from the synthetic telemetry intent path, and adds `orb_range_ticks` metadata for `OrbRangeVsAtr`. Verification: focused tests 30/30, `verify-build.bat` 538/538, Core Release no-build 449/449, deploy backup `20260823_151931`. Manual NT8 compile and live/SIM STATE_DETAIL spot-check still required. P1-E finding: the cited `-523.25` was a telemetry data-alignment defect, not a real overnight gap; NQ SEP26 daily data showed 2026-08-17 close `30096.00` and 2026-08-18 open `30077.00` (`-19.00`).
|
||
|
||
**[GAP-060] REJECT SUMMARY snapshot mechanism goes dark for hours, including the entire RTH day** | Stage 1 | ✅ IMPLEMENTED — deploy blocked by running NT8
|
||
- Live SIM spot-check 2026-08-23/24: file log shows a ~16-hour `REJECT SUMMARY` blackout (`23:55:01` Aug 23 night → `16:00:00` Aug 24 afternoon), covering the entire 09:30-16:00 ET trading day. Confirmed the 09:30-10:00 "Grade A" telemetry Mo saw is by-design (real order path correctly blocked pre-ORB-close; those are hypothetical default-long diagnostic scores, not real signals) — but the log currently cannot show *why* any bar was rejected for that whole span.
|
||
- Root cause: `MaybeWriteRejectSummarySnapshot`'s blanket `TimeOfDay < 10:00 AM` gate suppresses the entire midnight-10am span daily (not just the ORB window); `_orbRejectSummarySnapshotWritten` is a session-lifetime flag that fires once (here, accidentally, during the first night's ETH activity) and never again on a multi-day run; snapshots are only ever reject-triggered with no independent timer.
|
||
- Prompt: `TASK_GAP060_REJECT_SUMMARY_VISIBILITY_PROMPT.md`. Implemented as observability-only: suppression is now ORB-window/date-aware, the once-after-ORB flag resets per day, and `OnBarUpdate` checks summary cadence on the live bar heartbeat instead of only inside reject logging. Open question resolved as (a): `SimpleORBStrategy.OnBar()` does record `OrbRangeNotEstablished` before and after ORB close during an RTH no-breakout path; missing visibility was adapter summary reporting, not a distinct SimpleORB defect. Verification: focused tests 8/8, `verify-build.bat` 543/543, Core Release no-build 454/454. Deployment attempted but blocked because NinjaTrader.exe PID 18800 locked `NT8.Core.dll`; commit made per operator instruction without deploy.
|
||
### Also raised by the review, not yet prompted
|
||
GAP-051 (`MicroUpgradeThreshold` fires every session) · GAP-052 (two hardcoded tick-value tables) ·
|
||
GAP-053 (`executive_summary.md` and `roadmap.md` Sprint 3 list present ~12 completed tasks as open) ·
|
||
plus the standing dirty working tree — 17 modified, 5 untracked, including two live strategy files.
|
||
|
||
---
|
||
|
||
## 🟢 PARALLEL — Non-Algorithm Product Work (safe during Gate Run #3)
|
||
|
||
**[DASH-001] Standalone Read-Only Dashboard** | Sprint 5 (pulled forward) | 🔵 ACTIVE
|
||
- Scope: `tools\dashboard\` — external app, reads `trades_*.jsonl`, `provenance_*.json`, `settings_*.txt`, `session_*.log` from disk. No NT8 assembly references, never compiled into `NinjaTrader.Custom.dll`, no writes back to NT8.
|
||
- v1 features: live trade state (session log tail), today's trades table (grade/score/runner-mode/session-tag), config/provenance panel (config_hash, EnableKillSwitch, TestMode, BarsPeriod), raw session log tail view.
|
||
- Explicit non-goal for v1: no control layer (pause/flatten/kill switch) — that's Sprint 6, different risk profile (writes to NT8).
|
||
- Zero-risk classification: safe to build, run, and iterate at any time, including while the gate strategy is armed. No timing-rule constraint applies.
|
||
- Approved: 2026-08-10 (Mo).
|
||
- Related: `docs/IDEAS_BACKLOG.md` (n8n AM Briefing — related but separate item), `NT8_SDK_Master_Document` Appendix B (Command Center spec — source of feature inspiration for external version).
|
||
- **Extension (2026-08-16):** Add outbound notification module to the dashboard's Python server (NOT to the NinjaScript strategy) using Apprise for unified Discord/Notifiarr/ntfy/etc. delivery. Alerts on FILL, SUBMIT, BREAKEVEN, CONNECTION LOST/RESTORED, daily P&L milestones. Bind server to 127.0.0.1 only, read-only endpoints, no POST/write routes. Poll interval must be explicit/configurable: 1-2s for live session-log tail, 5-10s for trades table/config panel.
|
||
- **Bugfix/Extension (2026-08-17):** Live server current-session selection now uses newest root-level `session_*.log` by file modification time and populates `current_session` even when notification offsets start at EOF. Dashboard adds a Bars/Days-Loaded panel from existing Historical readiness and FactorWarmup log lines.
|
||
- **[DASH-003] Bugfix/Extension (2026-08-17):** `/api/state` live trades now reads only the current session date's `trades_*.jsonl` instead of falling back to old historical trade records; `/api/state` also returns current-session rows/diagnostics so Daily Timeline, Config Integrity, Silent Day Explorer, and Decision/Defect headline populate without manual JSON load.
|
||
- **[DASH-004] Trading Console Alternate Dashboard Page (2026-08-17):** Add `console.html`, `console.css`, and `console.js` as a second read-only dashboard page. It uses only real `/api/state` fields, links back to the triage board, and avoids fabricated trade P&L, multi-instrument, or multi-timeframe telemetry.
|
||
|
||
**[DASH-002] Continuous Confluence & Regime Telemetry** | Weekend window 2026-08-16 | 🔵 ACTIVE
|
||
- Scope: `src\` source change — adds `EnableStateTelemetry` parameter emitting periodic factor/regime state to session log (currently only logged at signal time). Additive observability only; existing SIGNAL/SUBMIT/FILL/PNL_UPDATE lines must remain byte-for-byte unaffected.
|
||
- Requires gate strategy DISABLED for build+deploy+recompile. Confirmed disabled for this weekend window; must be verified clean and re-armed before Monday market open.
|
||
- Emission cadence to be proposed by Kilocode (wall-clock throttle, not per-primitive-bar) and approved before implementation.
|
||
- Prompt: `TASK_DASH-002_PROMPT.md`.
|
||
- decisions.md entry required once cadence is finalized.
|
||
|
||
---
|
||
|
||
## 🔵 ACTIVE — Gate 3 Preparation
|
||
|
||
**[RB-4.1] Gate Run #3 Configuration Freeze** | Human operator | 🔵 ACTIVE
|
||
- In SimSimple ORB, set and verify: `EnableDynamicStop=TRUE`, `RunnerActivationMode=Auto`, `RegimeGate=GradePenalty`, `MinTradeGrade=A`, `MaxDailyTrades=1`, `TestMode=FALSE`, `EnableFileLogging=TRUE`, `EnableVerboseLogging=TRUE`, and `LogDirectory=C:\\Users\\billy\\Documents\\NinjaTrader 8\\log\\nt8-sdk`.
|
||
- Export settings, retain the parameter hash and code-version stamp, and record `DEC-GATE3-CONFIG` with the gate start date.
|
||
- Freeze evidence is archived in `docs/gate-runs/gate3/baseline.json` (`freeze_20260816_170304`).
|
||
- Remaining acceptance: manual NinjaScript compile/re-arm completed, GAP-034 closed, and the no-deploy rule is in force at gate start.
|
||
|
||
---
|
||
|
||
## 📋 QUEUE — no deploy to the gate machine during a run
|
||
|
||
**[GAP-025] Runner No-Fill Anomaly Diagnosis** | Sprint 2.7 | ⏳ QUEUED — branch-only during Gate Run #2
|
||
- Add diagnostic-only runner order/execution state logging.
|
||
- Diagnose the SIM fill sequence; this blocks live promotion, not Gate Run #2.
|
||
|
||
**[GAP-022-FOLLOWUP] Connection-State Test Seam** | Sprint 2.7 | ⏳ QUEUED — branch-only during Gate Run #2
|
||
- Add an injectable connection-state seam around `NT8StrategyBase`.
|
||
- Then implement the three deferred scenarios: news-day reduced sizing, mid-trade disconnect, and pre-entry disconnect.
|
||
|
||
**[GAP-030] Historical ORB State Hydration** | Sprint 2.7 | ⏳ QUEUED — branch-only during Gate Run #2
|
||
- On a late strategy enable, reconstruct only the current day's 09:30–10:00 ET opening-range high/low from loaded bars.
|
||
- Preserve the realtime replay guard: hydrated historical bars must never create an intent/order; only genuine post-hydration realtime bars may be evaluated.
|
||
- Add tests for correct range reconstruction and for zero historical-order submissions.
|
||
|
||
**[GAP-007] Walk-Forward Validation** | Sprint 2.7 | ⏳ QUEUED — only after a passing Gate Run #2 ruling
|
||
|
||
---
|
||
|
||
## ✅ COMPLETED — Sprint 2.7
|
||
|
||
**[GAP-031] Trade Provenance Signal/Submission Wiring** | ✅ 2026-08-03
|
||
- Trade JSONL now serializes confluence grade/score and ORB ticks from the accepted intent metadata and the exact runner mode resolved for submission.
|
||
- Release build passed with zero errors; 498 tests passed; deployed source and assembly hashes match. Manual NinjaScript compile remains part of RB-4.1.
|
||
|
||
**[GAP-032] Session-Scoped MaxDailyTrades Enforcement** | ✅ 2026-08-03
|
||
- Position-flat updates no longer reset trade eligibility; the accepted-intent count persists until trading-date rollover.
|
||
- Same-session rejection logs `MaxDailyTrades reached`; next-session first entry is covered by tests.
|
||
- Release build passed; 500 tests passed; deployed source and assembly hashes match. Manual NinjaScript compile remains part of RB-4.1.
|
||
|
||
**[GAP-033] Session Historical-Readiness and Gate Safety Logging** | ✅ 2026-08-03
|
||
- Session startup logs `BarsRequiredToTrade`, resolved `DaysToLoad`, and actual loaded bars for every data series at DataLoaded and Realtime transition.
|
||
- Logs explicit 7-daily-bar NarrowRange and 5-daily-bar OrbRangeVsAtr readiness, warning without blocking when insufficient.
|
||
- Warns when `EnableKillSwitch=False` on an account containing `SimSimple`.
|
||
- Additive logging only; Release build and all 500 tests passed; deployed hashes match. Manual NinjaScript compile remains part of RB-4.1.
|
||
|
||
**[TASK-GOV-02] Governance Truth Reconciliation** | ✅ 2026-07-13
|
||
- Restored the July 11 historical record, corrected documentation placement, and logged DEC-20260713-02.
|
||
|
||
**[TASK-00a] Provenance Controls (reissued)** | ✅ 2026-07-13
|
||
- Session provenance, trade JSONL, SHA256 parameter hashing, settings export, TestMode state, and July 11 parameter export are implemented.
|
||
|
||
**[GAP-024] Session Tagging Data Layer** | ✅ 2026-07-13
|
||
- Exact `RTH_ORB`, `ETH`, `HOLIDAY`, and `EARLY_CLOSE` tags are written to provenance and trade records.
|
||
|
||
**[GAP-022] Scenario Tests** | 🟡 PARTIAL — 5/8 verified 2026-07-14
|
||
- Implemented with real assertions: high volatility rejection, low liquidity degradation, partial fill, daily-loss halt, and circuit-breaker open.
|
||
- Deferred honestly with source TODOs: news-day reduced sizing needs calendar/sizing-policy API; mid-trade and pre-entry disconnect scenarios need an injectable connection-state seam.
|
||
|
||
**[GAP-029] Code-Version Provenance Stamp** | ✅ 2026-07-14
|
||
- Session provenance, per-trade JSONL, settings exports, and SimpleORB snapshots now record the compiled assembly version plus module MVID.
|
||
- Each real-time signal also writes its TestMode/LIVE MODE state to the session file log.
|
||
|
||
---
|
||
|
||
## 📋 HISTORICAL RECORD: July 11 Sprint (Sprint 2) — COMPLETED
|
||
|
||
The following 11 tasks were completed on 2026-07-11 and are already implemented in code. They were incorrectly erased/re-queued during a prior governance rewrite; this record preserves their actual completion dates.
|
||
|
||
| Task | Sprint | Date | Status |
|
||
|---|---:|---|---|
|
||
| TASK-06a Runner Mode | 2 | 2026-07-11 | ✅ |
|
||
| TASK-06b ATR Dynamic Stop | 2 | 2026-07-11 | ✅ |
|
||
| GAP-019 Portfolio Heat | 2 | 2026-07-11 | ✅ |
|
||
| GAP-003 RiskPerTrade Assert | 2 | 2026-07-11 | ✅ |
|
||
| GAP-004 orbRangeTicks Fix | 2 | 2026-07-11 | ✅ |
|
||
| GAP-005 GetRiskStatus Live | 2 | 2026-07-11 | ✅ |
|
||
| GAP-006 Position-Close Re-arm | 2 | 2026-07-11 | ✅ |
|
||
| GAP-010 Short-Side Filter | 2 | 2026-07-11 | ✅ |
|
||
| GAP-008 CME Holiday | 2 | 2026-07-11 | ✅ |
|
||
| GAP-009 ATR Trailing | 2 | 2026-07-11 | ✅ |
|
||
| GAP-011 Gitea CI | 2 | 2026-07-11 | ✅ |
|
||
|
||
---
|
||
|
||
## 📋 Sprint 3 Backlog — deferred until Gate Run #2 ruling
|
||
|
||
- TASK-06d — VWAP Mean Reversion
|
||
- GAP-013 — ContractRollHandler completion
|
||
- GAP-014 — LiquidityMonitor Level II preparation
|
||
- GAP-015 — Config JSON export/import
|
||
- MNQ-001 / MNQ-002 — MNQ preparation and parameter calibration
|