4.5 KiB
TASK: GAP-067 — Eight properties declared in both NT8StrategyBase and SimpleORBNT8 (CS0108 ignored)
Staged: 2026-10-24 — v9.0 task P1-D; Master Document v9.0 §4.10.2
Sprint: Stage 1 — make the instrument trustworthy
Owner: Kilocode
Depends on: GAP-066 committed (TASK_GAP066_SETDEFAULTS_ORDERING_PROMPT.md). Do not start before it.
Deploy: COMMIT ONLY — do NOT run deploy-to-nt8.bat.
Constraints: C# 5.0 / .NET Framework 4.8. NT8 attribute/property behaviour must be verified
against https://developer.ninjatrader.com/docs/desktop.
THE DEFECT
These eight [NinjaScriptProperty] properties are declared in both classes without new:
EnableBarBasedRearm, EnableShortTrendFilter, EnableCMEHolidayGuard, EnableATRTrailing,
ATRTrailingPeriod, ATRTrailingMultiplier, ATRTrailingMinTicks, ATRTrailingMaxTicks.
Each name has two independent backing values. Base code (holiday guard OnBarUpdate ~:667,
ATR trailing in SubmitOrderToNT8 :2321–2328, BuildStrategyContext → CustomData,
GetStrategySettingsLines → settings_*.txt, GetJuly11Params → provenance_*.json) reads the
base copy. SimpleORBNT8.ConfigureStrategyParameters() (:431–438) passes the derived copy
to the SDK strategy. Seven of the eight are indistinguishable in the property grid. Dormant today only
because both SetDefaults blocks assign identical values (false, true, true, false, 14, 2.0, 8, 60);
it arms the moment the operator changes any of them. The settings export — a rank-3 evidence
artifact — cannot be trusted for these eight.
READ-FIRST
src/NT8.Adapters/Strategies/SimpleORBNT8.cs— the eight declarations (~:63–100), itsSetDefaultsassignments for them, and every read of them (especiallyConfigureStrategyParameters).src/NT8.Adapters/Strategies/NT8StrategyBase.cs— the eight base declarations (~:327–362),SetDefaultsassignments, and every consumer listed above.docs/NT8_SDK_Master_Document_v9.0_Complete.md§4.10.2 — full consumer table.- Confirm GAP-066 has landed:
base.OnStateChange()now runs before the subclass'sSetDefaultsassignments. If not, stop.
THE FIX (v9.0 preferred pattern 1)
- Delete the eight declarations from
SimpleORBNT8. The base declarations are inherited and appear once in the grid — the same way the other 38 base properties already work. SimpleORBNT8code that read its own copies now reads the inherited ones; no rename needed.- If
SimpleORBNT8'sSetDefaultsassigns these eight, keep those assignments only if a value differs from the base default (none currently do — so remove them, and say so). - Do not change any default value.
- Treat CS0108 as an error for the adapter sources if it can be done for the code paths this repo
builds (
<WarningsAsErrors>CS0108</WarningsAsErrors>in the relevant.csproj). The adapter.csfiles are compiled by NinjaTrader, not MSBuild (v9.0 §4.1) — if MSBuild never compiles them, say so and instead rely on the source-text test below as the enforcement mechanism.
WORKSPACE COMPATIBILITY — CHECK AND REPORT
Saved NT8 workspaces/strategy templates serialize property values by name. Removing the derived declaration should bind saved values to the inherited property of the same name. Verify against the docs whether that holds; if it is uncertain, state it as an operator validation item rather than guessing.
REQUIRED TESTS (source-text pattern, must fail against current source)
- None of the eight names is declared as a property in
SimpleORBNT8.cs. - Each of the eight is declared exactly once in
NT8StrategyBase.cs. - General guard: no
publicproperty name inSimpleORBNT8.csalso appears as apublicproperty declaration inNT8StrategyBase.cs(prevents the next copy-paste collision).
DO NOT
- Do not change defaults,
GroupName,Order, or[Range]on the base declarations. - Do not touch scoring, risk, sizing or order submission.
- Do not deploy.
VERIFICATION
verify-build.bat green with test count. Commit: [GAP-067]: remove shadowed property declarations.
OPERATOR VALIDATION (after deploy + recompile)
NinjaScript compile output shows no CS0108 for these names. Property grid shows each of the eight
once. Change EnableCMEHolidayGuard in the grid → settings_*.txt reflects the change.
GOVERNANCE
Track as GAP-067 in SPRINT_BOARD.md; log a decisions.md entry referencing
DEC-20260922-01 and v9.0 §4.10.2.