[GAP-059]: ORB range telemetry context complete
- SimpleORBNT8.cs: source telemetry ORB range from SDK opening range tracker - SimpleORBNT8DefaultsTests.cs: guard against dead adapter ORB fields and verify SDK source - OrbConfluenceFactorTests.cs: prove realistic ORB range ticks produce ratio reason - SPRINT_BOARD.md and decisions.md: record implementation and deploy blocker Build: clean | Tests: 545 passing; Core 456 passing | Dual-deployed: no - NinjaTrader.exe PID 18800 locked NT8.Core.dll
This commit is contained in:
@@ -24,6 +24,16 @@ 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-05
|
||||
- **ID:** DEC-20260823-05
|
||||
- **Date:** 2026-08-23/24 (live SIM session spanning midnight)
|
||||
- **Status:** implemented
|
||||
- **Context:** Continuing tonight's post-compile SIM validation (`session_20260823_230519.log`), `STATE_DETAIL` lines from 08:29 ET through 10:49 ET (well past the 09:30-10:00 ORB window, with `STATE_CONTEXT` confirming `OrbReady=True OrbHigh=29243.00 OrbLow=28946.75`) all still report `OrbRangeVsAtr="No daily bar context available"` — the exact second symptom GAP-049's task description originally flagged, and which DEC-20260823-03's Action Required specifically asked to be re-checked live. `GapDirectionAlignment` is confirmed working correctly in the same lines (e.g. `Large gap -278.25 aligns with trade`), so this is not a re-occurrence of the direction bug — it's a distinct, still-open issue.
|
||||
- **Root cause:** `OrbRangeVsAtrFactorCalculator.Calculate()` requires `intent.Metadata["orb_range_ticks"]` to be present. GAP-049's fix correctly adds that key when `telemetryDaily.OrbRangeTicks > 0.0`, but `telemetryDaily.OrbRangeTicks` copied the adapter-built `_strategyConfig.Parameters["daily_bars"].OrbRangeTicks`. That source was built in `SimpleORBNT8.OnBarUpdate()` from local fields `_openingRangeHigh`/`_openingRangeLow`, which were declared/read but never assigned, so the ORB range stayed `0.0` and telemetry never emitted `orb_range_ticks`.
|
||||
- **Decision:** Track as **GAP-059** and fix the adapter daily-context data source only. Source `orbHigh`/`orbLow` from `(_sdkStrategy as SdkSimpleORB).OpeningRangeHigh`/`OpeningRangeLow` when `OpeningRangeReady` is true, matching the existing `STATE_CONTEXT` and diagnostics source of truth, and remove the dead legacy fields.
|
||||
- **Implementation Note (2026-08-25):** GAP-059 implemented in `SimpleORBNT8.OnBarUpdate()` by reading `SdkSimpleORB sdkOrb = _sdkStrategy as SdkSimpleORB` and using `sdkOrb.OpeningRangeHigh` / `sdkOrb.OpeningRangeLow` only when `sdkOrb.OpeningRangeReady` is true. The unused `_openingRangeHigh` and `_openingRangeLow` adapter fields were removed after search confirmed no writer existed. `OrbRangeVsAtrFactorCalculator`, GAP-049's telemetry clone, signal generation, sizing, risk, order submission, and line formats were unchanged. Scope nuance: the SDK strategy does read `_config.Parameters["daily_bars"]` for daily context, but real ORB-range metadata is still set from `SimpleORBStrategy.CreateIntent()`/`AttachDailyBarContext()` once a real candidate exists; this fix corrects the adapter's stale daily-context source feeding telemetry and shared daily context.
|
||||
- **Evidence:** Added source-level `SimpleORBNT8DefaultsTests` coverage because NinjaScript strategies are not directly instantiated in normal Core tests; added `OrbConfluenceFactorTests` coverage proving realistic SDK ORB high/low-derived ticks produce a ratio-based `OrbRangeVsAtr` reason instead of the neutral missing-context reason. Focused GAP-059 tests passed 32/32. `verify-build.bat` passed with 545/545 tests (456 Core, 79 Integration, 10 Performance). `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal` passed 456/456.
|
||||
- **Action Required:** Deployment remains pending. `deployment\deploy-to-nt8.bat` was not rerun because NinjaTrader.exe PID 18800 remained active and previously locked `NT8.Core.dll`; operator instructed Kilocode to commit without deploy. After NinjaTrader is closed, rerun deployment, start NT8, manually compile NinjaScript, and confirm a post-`OrbReady=True` `STATE_DETAIL` line reports a ratio-based `OrbRangeVsAtr` reason instead of `No daily bar context available`.
|
||||
### DEC-20260823-03
|
||||
- **ID:** DEC-20260823-03
|
||||
- **Date:** 2026-08-23
|
||||
|
||||
Reference in New Issue
Block a user