[GAP-052]: tick value table consolidation complete

- InstrumentTickValueTable.cs: add shared platform-neutral union tick-value table

- BasicRiskManager.cs and BasicPositionSizer.cs: delegate tick lookup and supported symbols to shared table

- AdvancedRiskManager.cs and AdvancedPositionSizer.cs: remove duplicate tick tables and delegate to shared table

- BasicRiskManagerTests.cs: prove risk/sizing table parity and 6A uses  tick value

- SPRINT_BOARD.md and decisions.md: record Option A, platform-neutrality rationale, and verification evidence

Build: clean | Tests: 552 passing; Core 463 passing | Dual-deployed: no - skipped per operator instruction
This commit is contained in:
2026-08-25 10:50:27 -04:00
parent 18877c376c
commit 8b9a2e2b6a
9 changed files with 220 additions and 69 deletions

View File

@@ -24,6 +24,15 @@ Use this file to record durable project decisions that affect implementation pat
- **Related Files:** `src/NT8.Adapters/Strategies/NT8StrategyBase.cs` (`MaybeWriteRejectSummarySnapshot`/`LogRejectRateLimited`/`ResetRejectTracking`/`WriteSessionHeader` ~1444-1517), `src/NT8.Strategies/Examples/SimpleORBStrategy.cs` (`OnBar` ~355-432, `RecordSignalRejection` ~1015-1026), `session_20260823_230519.log`
- **Implementation Note (2026-08-25):** GAP-060 implemented as logging/observability only. `NT8StrategyBase.MaybeWriteRejectSummarySnapshot()` no longer has a blanket midnight-to-10:00 AM suppression gate; suppression now delegates to an ORB-window-aware helper and `SimpleORBNT8` overrides that helper so the suppressed window is today's configured 09:30 + `OpeningRangeMinutes`. The once-after-ORB snapshot flag now resets per `barTime.Date`, allowing a new post-ORB summary every day in a continuous multi-day session. `OnBarUpdate()` now calls `MaybeWriteRejectSummarySnapshot(Time[0])` on the live bar heartbeat after the first realtime-bar guard, so 15-minute summary cadence can flush from regular processed bars and is not solely dependent on a newly logged reject. Existing `_rejectDetailsLogged` one-detail-line-per-reason rate limiting, reject reason strings, `REJECT:`/`REJECT SUMMARY:` formats, order flow, sizing, risk, and real trade decisions were unchanged. Open question resolved as possibility **(a)**: the missing `OrbRangeNotEstablished` visibility was adapter summary reporting, not a second SimpleORB rejection defect. A focused `SimpleORBStrategy.OnBar()` test proves the no-breakout RTH path records `OrbRangeNotEstablished` both while the ORB is building and after ORB close when no breakout confirms. Verification: focused GAP-060 tests passed 8/8; `verify-build.bat` passed with 543/543 tests (454 Core, 79 Integration, 10 Performance); `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal` passed 454/454.
- **Action Required:** Deployment remains pending. `deployment\deploy-to-nt8.bat` was attempted on 2026-08-25 but failed because NinjaTrader.exe PID 18800 locked `NT8.Core.dll`; operator instructed Kilocode to commit without deploy. After NinjaTrader is closed, rerun deployment, start NT8, manually compile NinjaScript, and in the next SIM session spanning a full trading day confirm `REJECT SUMMARY` appears throughout RTH at a reasonable cadence.
### DEC-20260823-07
- **ID:** DEC-20260823-07
- **Date:** 2026-08-23/24
- **Status:** implemented
- **Context:** GAP-052 was flagged by the original v7.0 review as "two hardcoded tick-value tables" without further detail. Confirmed duplicated `GetTickValue(string symbol)` helpers in Basic risk/sizing and additional Advanced risk/sizing helpers. The concrete defect was `6A`: `BasicPositionSizer` used `$10.00` while `BasicRiskManager` fell through to `$12.50`, producing a 25% risk-calculation mismatch if 6A were traded. NQ/MNQ were already consistent and remain unchanged.
- **Decision:** Implement Option A — a shared static table — because `BasicRiskManager`, `BasicPositionSizer`, `AdvancedRiskManager`, and `AdvancedPositionSizer` live in platform-neutral `NT8.Core` and cannot directly depend on NinjaTrader `Instrument.MasterInstrument` APIs without changing project layering. Option B remains a possible future adapter-supplied enhancement, not part of this platform-neutral fix.
- **Implementation Note (2026-08-25):** Added `NT8.Core.Common.InstrumentTickValueTable` with the union of existing supported symbols (`ES`, `MES`, `NQ`, `MNQ`, `CL`, `GC`, `6E`, `6A`) and updated all four risk/sizing helpers to delegate to it. This fixes the concrete `6A` defect (`$10.00` instead of the old BasicRiskManager `$12.50` default) and removes the duplicated hardcoded tables from those helpers. Verification: focused `BasicRiskManagerTests` passed 26/26; `verify-build.bat` passed with 552/552 tests (463 Core, 79 Integration, 10 Performance); `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal` passed 463/463.
- **Related Files:** `src/NT8.Core/Common/InstrumentTickValueTable.cs`, `src/NT8.Core/Risk/BasicRiskManager.cs`, `src/NT8.Core/Sizing/BasicPositionSizer.cs`, `src/NT8.Core/Risk/AdvancedRiskManager.cs`, `src/NT8.Core/Sizing/AdvancedPositionSizer.cs`, `tests/NT8.Core.Tests/Risk/BasicRiskManagerTests.cs`, `TASK_GAP052_TICK_VALUE_CONSOLIDATION_PROMPT.md`
- **Action Required:** Deployment intentionally skipped per operator instruction. No operator validation required for currently traded NQ/MNQ; both remain unchanged at `$5.00`/`$0.50`.
### DEC-20260823-06
- **ID:** DEC-20260823-06
- **Date:** 2026-08-23/24