[GAP-049]: telemetry direction context complete
- SimpleORBNT8.cs: clone daily context for STATE telemetry and set direction/session-open fields - SimpleORBNT8DefaultsTests.cs: add source tests for telemetry clone and orb_range_ticks metadata - OrbConfluenceFactorTests.cs: prove sell/down-gap alignment scores correctly - SPRINT_BOARD.md and decisions.md: record implementation, P1-E finding, verification, and deploy evidence Build: clean | Tests: 538 passing; Core 449 passing | Deploy: backup 20260823_151931
This commit is contained in:
@@ -13,6 +13,17 @@ Use this file to record durable project decisions that affect implementation pat
|
||||
|
||||
## Decision Log
|
||||
|
||||
### DEC-20260823-03
|
||||
- **ID:** DEC-20260823-03
|
||||
- **Date:** 2026-08-23
|
||||
- **Status:** implemented
|
||||
- **Context:** GAP-049 found that `SimpleORBNT8.BuildStateTelemetryIntent()` attached the shared `_strategyConfig.Parameters["daily_bars"]` object directly to synthetic `STATE:` telemetry. `GapDirectionAlignmentCalculator` and `PriorDayCloseStrengthCalculator` read `DailyBarContext.TradeDirection`, but the telemetry path deliberately does not call `SimpleORBStrategy.AttachDailyBarContext()` because that real-trade helper mutates shared daily context fields. Result: short telemetry could retain a stale long direction and log a downward gap as "opposes trade." The same log block also showed `OrbRangeVsAtr="No daily bar context available"` because telemetry had daily context but did not include the separate `orb_range_ticks` metadata key required by that factor.
|
||||
- **Decision:** Keep GAP-049 observability-only by fixing only the synthetic telemetry path. `SimpleORBNT8.BuildStateTelemetryIntent()` now builds a clone of the `DailyBarContext`, sets clone-only scalar fields from telemetry inputs (`TradeDirection`, `BreakoutBarVolume`, `TodayOpen`, `AvgIntradayBarVolume`), attaches that clone as `daily_bars`, and adds `orb_range_ticks` metadata from the cloned context. No `SIGNAL`, `SUBMIT`, `FILL`, `PNL_UPDATE`, `REJECT`, sizing, risk, order submission, or real trade-decision path was changed.
|
||||
- **P1-E Finding:** The cited `-523.25` point gap was a data-alignment defect in telemetry, not a real overnight NQ gap. The session log `session_20260818_071117.log` reported different gap values throughout the same RTH session, ranging from roughly `-389.75` to `-555.75`, which cannot represent a fixed overnight open gap. External NQ SEP26 daily data showed 2026-08-17 close `30096.00` and 2026-08-18 open `30077.00`, a `-19.00` daily gap. Root cause: telemetry seeded `DailyBarContext.TodayOpen` from the current primary bar's `Open[0]`; the clone now mirrors the real trade path and prefers `context.CustomData["session_open_price"]`.
|
||||
- **Evidence:** Added source-level tests proving telemetry uses `CloneDailyBarContextForTelemetry`, attaches the clone rather than the shared daily context, and emits `orb_range_ticks`; added a factor test proving a large down gap with sell direction scores `1.0` and says "aligns with trade," not "opposes trade." Focused GAP-049 tests passed 30/30. `verify-build.bat` passed with 538/538 tests (449 Core, 79 Integration, 10 Performance). `dotnet test tests\NT8.Core.Tests\NT8.Core.Tests.csproj --configuration Release --no-build --verbosity minimal` passed 449/449. `deployment\deploy-to-nt8.bat` completed with backup `20260823_151931` and noted `NinjaTrader.Custom.dll` was not present to invalidate.
|
||||
- **Related Files:** `src/NT8.Adapters/Strategies/SimpleORBNT8.cs`, `tests/NT8.Core.Tests/Adapters/SimpleORBNT8DefaultsTests.cs`, `tests/NT8.Core.Tests/Intelligence/OrbConfluenceFactorTests.cs`, `TASK_GAP049_TELEMETRY_DIRECTION_PROMPT.md`
|
||||
- **Action Required:** Manual NT8 startup/compile remains required for NinjaScript source. In the next live/SIM diagnostic session, confirm `STATE_DETAIL` for a sell setup with a down gap reports `GapDirectionAlignment` as aligned and `OrbRangeVsAtr` no longer says no daily context when daily warm-up is satisfied.
|
||||
|
||||
### DEC-20260823-02
|
||||
- **ID:** DEC-20260823-02
|
||||
- **Date:** 2026-08-23
|
||||
|
||||
Reference in New Issue
Block a user