- governance: stage v7.0 review prompts, run book, roadmap/current-status/decision updates, and sprint board state - adapters: capture DASH/trailing-drawdown/state-telemetry strategy work already present in the worktree - tools: capture dashboard console/KPI parser updates, logtriage notes, and runnersweep output Build: previously clean | Tests: previously 511 passing | Includes all open staged files
94 lines
5.2 KiB
Markdown
94 lines
5.2 KiB
Markdown
# TASK: DASH-002 — Continuous Confluence & Regime Telemetry
|
|
# Staged: 2026-08-16 (weekend window, gate strategy confirmed DISABLED)
|
|
# Sprint: Parallel Product Work | Requires: gate strategy DISABLED for this deploy
|
|
# ─────────────────────────────────────────────────────────────────
|
|
|
|
## Framing
|
|
This IS a source change in src\ — it recompiles NinjaTrader.Custom.dll. Only
|
|
proceed because the gate strategy is confirmed disabled for this weekend
|
|
window. C# 5.0 / .NET 4.8 constraints apply (no interpolation, no
|
|
null-conditional operators, no async/await, no records).
|
|
|
|
This is additive observability only. It must not change entry/exit decision
|
|
logic, timing, thresholds, or order submission in any way. The existing
|
|
SIGNAL/SUBMIT/FILL/PNL_UPDATE lines must remain byte-for-byte unaffected.
|
|
|
|
Hard deadline context: this must be built, deployed, and verified clean
|
|
BEFORE market open Monday, with time left to re-arm calmly. If read-first
|
|
findings suggest this can't be done safely and verified in the available
|
|
window, say so explicitly rather than rushing a deploy.
|
|
|
|
## SAFETY FINDING (resolved 2026-08-17, DEC-20260817-04)
|
|
RegimeManager, TrendRegimeDetector, and VolatilityRegimeDetector
|
|
(src\NT8.Core\Intelligence\) are instantiated in
|
|
NT8StrategyBase.InitializeSdkComponents() but are NOT called anywhere in
|
|
the live signal path today — confirmed by direct read of
|
|
NT8StrategyBase.cs, SimpleORBStrategy.cs, and FactorCalculators.cs. The
|
|
regime/volatility values actually used for signal generation are computed
|
|
independently: inline SMA20/50 math in BuildStrategyContext() and
|
|
pure-function ATR-ratio math inside VolatilityRegimeFactorCalculator /
|
|
TrendAlignmentFactorCalculator, which read from context.CustomData and
|
|
have no side effects.
|
|
|
|
RegimeManager.UpdateRegime(), TrendRegimeDetector.DetectTrend(), and
|
|
VolatilityRegimeDetector.DetectRegime() DO mutate internal state on every
|
|
call (bar history, current-regime dictionaries, transition logs) and are
|
|
currently unused/dead code. DASH-002 telemetry MUST NOT call any of these
|
|
three methods (nor VolatilityRegimeDetector.UpdateRegimeHistory(), which
|
|
also mutates state) for periodic sampling — doing so would make telemetry
|
|
the first real consumer of state nothing else reads, which could corrupt
|
|
assumptions if a future task wires these classes into the live decision
|
|
path.
|
|
|
|
Note: the read-only getters (GetCurrentRegime(), GetCurrentTrendRegime(),
|
|
GetCurrentTrendStrength(), GetRegimeDuration(), GetTransitions(),
|
|
GetRecentTransitions()) are safe to call but will return defaults
|
|
(null / TrendRegime.Range / VolatilityRegime.Normal) since nothing
|
|
populates their backing dictionaries today — they are not a shortcut to
|
|
real data. Telemetry must instead sample from the same side-effect-free
|
|
sources already used for signal-time logging: the inline regime calc in
|
|
BuildStrategyContext, the existing IFactorCalculator.Calculate() pure
|
|
functions, and/or TrendRegimeDetector.CalculateTrendStrength() /
|
|
VolatilityRegimeDetector.CalculateVolatilityScore() called directly
|
|
(these are pure calculators, not the stateful Detect*/Update* methods).
|
|
|
|
## READ-FIRST
|
|
1. Locate where factor scores (Setup, Trend, Volatility, Timing,
|
|
ExecutionQuality, NarrowRange, OrbRangeVsAtr, GapDirectionAlignment,
|
|
BreakoutVolumeStrength, PriorDayCloseStrength) and regime are currently
|
|
computed, and where the existing "Factors: ..." log line is emitted
|
|
(currently only fires at signal time).
|
|
2. Confirm these values are available/computable on every bar close, not
|
|
only when a signal candidate exists.
|
|
3. Propose an emission cadence — NOT every primitive HFT Algo Bar (there are
|
|
530K+ historical bars loaded; per-bar logging on the primary series risks
|
|
excessive log volume/disk I/O on the strategy's own thread). Suggest a
|
|
wall-clock throttle (e.g. once per 1-2 seconds) or gate it to a secondary
|
|
lower-frequency series. State the tradeoff and stop for approval before
|
|
implementing.
|
|
|
|
## SCOPE
|
|
1. New log line type, e.g.:
|
|
[TIME] STATE: Regime=<value> Setup=.. Trend=.. Volatility=.. Timing=..
|
|
ExecutionQuality=.. NarrowRange=.. OrbRangeVsAtr=..
|
|
GapDirectionAlignment=.. BreakoutVolumeStrength=..
|
|
PriorDayCloseStrength=.. Score=.. Grade=..
|
|
2. Gate behind a new parameter EnableStateTelemetry (default True on SIM/
|
|
gate accounts, consistent with existing diagnostic flag conventions like
|
|
EnableChartDiagnostics/EnableVerboseLogging).
|
|
3. No change to any existing log line, threshold, or order path.
|
|
|
|
## VALIDATION
|
|
- Diff a pre-change and post-change session log's SIGNAL/SUBMIT/FILL/
|
|
PNL_UPDATE lines — must be byte-for-byte identical.
|
|
- Report an estimated log volume/disk growth over a full session at the
|
|
proposed cadence before deploying.
|
|
- Standard deploy: delete NinjaTrader.Custom.dll, full recompile, start a
|
|
verification session, confirm clean startup with the new STATE lines
|
|
present and existing lines unchanged, BEFORE re-arming for Monday.
|
|
|
|
## GOVERNANCE
|
|
- Track as [DASH-002] in SPRINT_BOARD.md.
|
|
- decisions.md entry required for the final cadence choice — this is a
|
|
judgment call with disk/performance tradeoffs and needs to be auditable.
|