Files
nt8-sdk/TASK_GAP052_TICK_VALUE_CONSOLIDATION_PROMPT.md
mo 34c3767fbf [GOV]: cleanup prompted task state
- SPRINT_BOARD.md: stage GAP-025/GAP-030 and correct GAP-062 deploy status

- TASK_GAP025_RUNNER_ORDER_LIFECYCLE_LOGGING_PROMPT.md: add runner lifecycle logging prompt

- TASK_GAP030_ORB_HYDRATION_VERIFY_PROMPT.md: add ORB hydration verify prompt

- TASK_GAP051/052/059/060 prompts: record commit-only deploy instruction

- TASK_GAP054_RUNNER_TRAIL_PROMPT.md: clarify SIM/replay validation path

- docs/00-governance/2026-08-19-run-book.md: reconcile implemented/verified task states

- docs/00-governance/active_work.md: update blocker status and validation requirements

- docs/00-governance/decisions.md: record prompted follow-ups and resolved GAP-062 deploy status

Build: clean | Tests: 569 passing | Deploy: GAP-062 deployed backup 20260826_005308
2026-08-26 00:59:35 -04:00

6.0 KiB

TASK: GAP-052 — Two hardcoded tick-value tables have already drifted out of sync

Staged: 2026-08-18 (v7.0 review, "raised, not yet prompted"), evidenced 2026-08-23/24

Sprint: Stage 1 — real latent defect for 6E/6A, zero risk for currently-traded NQ/MNQ

Owner: Kilocode

Deploy: COMMIT ONLY — do NOT run deploy-to-nt8.bat or copy build output to

the live NT8 install as part of this task. The Sim101 SIM session

is currently running and under live investigation; a redeploy

would restart it and break session continuity. Verify-build and

commit as usual; leave the deploy step for the operator to run

manually once ready.

─────────────────────────────────────────────────────────────────

THE DEFECT

Two independent, unsynchronized private static double GetTickValue(string symbol) methods exist:

BasicRiskManager.cs   ~178-191:  ES, MES, NQ, MNQ, CL, GC            (6 symbols) → default 12.50
BasicPositionSizer.cs ~155-170:  ES, MES, NQ, MNQ, CL, GC, 6E, 6A    (8 symbols) → default 12.50

This is not just a duplication risk flagged by the original review — the two tables have already drifted out of sync. BasicPositionSizer lists 6E ($12.50/tick) and 6A ($10.00/tick); BasicRiskManager does not list either and falls through to default: return 12.50.

For 6E, the default happens to match (12.50), so no live bug there today. For 6A, it does not: BasicPositionSizer would size a 6A position using the correct $10.00/tick, while BasicRiskManager.ValidateOrder() / CalculateTradeRisk() would validate that same position's risk using $12.50/tick instead — a 25% risk-calculation error, silently, if this symbol is ever traded. MaxTradeRisk enforcement on 6A would currently be wrong.

GAP-045/046 (this session) already confirmed MNQ is correctly present and matching ($0.50) in both tables — this finding is about the tables' remaining divergence, not about MNQ, and is not something GAP-045/046 was scoped to catch (it only checked the specific symbol that task cared about).

WHY IT MATTERS NOW

Not urgent for the currently-traded NQ (matches in both tables). But it's a live, confirmed correctness defect the moment any strategy instance trades 6E or 6A, and the fact that these two tables have ALREADY diverged once (silently, with nobody noticing until this review) is itself evidence this pattern will keep drifting unless consolidated.

READ-FIRST

  1. Read both GetTickValue methods in full, side by side.
  2. Check whether NinjaTrader.Instrument.MasterInstrument.TickSize/ PointValue is already used elsewhere in this codebase as a live, correct tick-value source (yes — NT8StrategyBase.ValidateStartupRiskConfiguration, added this session for GAP-045/046, already falls back to Instrument.MasterInstrument when populated). Consider whether that's available to BasicRiskManager/BasicPositionSizer too, or whether those classes are intentionally platform-neutral (NT8.Core, no NinjaTrader assembly reference) and therefore CANNOT reach Instrument.MasterInstrument directly — confirm which before assuming either approach is trivial.

THE CHANGE

Consolidate to a single source of truth. Two reasonable shapes — pick one and justify the choice in your writeback, don't silently default to whichever is easiest:

Option A — shared static table. A single TickValueTable (or similar) in NT8.Core, containing the union of both existing tables (add the missing 6E/6A entries), with both BasicRiskManager.GetTickValue and BasicPositionSizer.GetTickValue calling into it. Smallest diff, keeps the existing "hardcoded Phase 0 table, configurable later" architecture intact.

Option B — resolve from Instrument.MasterInstrument where available, falling back to the hardcoded table only when the adapter can't supply it (mirroring the pattern GAP-045/046 already established). Larger change, removes the duplication-drift risk permanently rather than fixing today's instance of it — but only pursue this if NT8.Core's platform-neutrality constraint doesn't block it; if it does, Option A is correct and Option B should be logged as a future architectural note instead.

Either way: add the missing 6E/6A entries so BasicRiskManager matches BasicPositionSizer exactly, regardless of which structural option you choose — that part is not optional.

DO NOT

  • Do not change MaxTradeRisk/MaxStopTicks/any other risk parameter for NQ or MNQ as part of this — those are unaffected (both tables already agree on those two).
  • Do not change sizing or risk-validation logic itself, only the tick-value lookup both already call into.
  • Do not add new tradeable-symbol support beyond making the two tables consistent (i.e. don't go add e.g. RTY or YM unless they were already in one of the two tables).

TESTS (required)

  1. A test asserting BasicRiskManager.GetTickValue (or its consolidated replacement) and BasicPositionSizer.GetTickValue (or its consolidated replacement) return identical values for every symbol either currently lists — this is the regression test that would have caught today's 6E/6A divergence and must catch any future one.
  2. A test confirming 6A now resolves to $10.00 (not the old $12.50 default) from whichever code path BasicRiskManager's risk calculation actually uses.

VALIDATION (operator)

None required — NQ/MNQ (the only currently-traded symbols) are unaffected by this change; this closes a latent defect for symbols not currently in use.

GOVERNANCE

Track as [GAP-052] in SPRINT_BOARD.md. Update docs/00-governance/decisions.md DEC-20260823-07 status to implemented with an implementation note stating which option (A or B) was chosen and why, and confirming the platform- neutrality question from READ-FIRST. Reference: this task, DEC-20260823-07, GAP-045/GAP-046 (d652e29) for the MNQ tick-value confirmation this finding builds on.