Files
nt8-sdk/tools/configdiff

configdiff

configdiff is a standalone Python CLI that parses settings_Simple_ORB_NT8_*.txt exports and reports configuration drift without referencing any NinjaTrader assembly.

Python was chosen instead of a .NET console app so the tool stays fully outside NT8-SDK.sln, adds no NT8 dependency surface, and cannot affect deployed NT8 output.

What It Reports

  • A matrix of every parsed settings parameter across every export in scope
  • Highlighted changed values using *value*
  • Explicit callouts when ConfigHash is identical but parameters still differ This independently catches the known DEC-20260810-01 BarsPeriod/hash defect before GAP-038 lands.
  • Exit code 1 when drift is detected inside a declared gate window

Inputs

The tool scans a directory for:

  • settings_Simple_ORB_NT8_*.txt

Default directory:

%USERPROFILE%\Documents\NinjaTrader 8\log\nt8-sdk

Usage

Run across all matching exports:

python tools/configdiff/configdiff.py

Run against a specific archive directory:

python tools/configdiff/configdiff.py "C:\logs\nt8-sdk-archive"

Check only a gate window starting on a specific date:

python tools/configdiff/configdiff.py --gate-start 2026-08-07

Use the exit code in automation:

python tools/configdiff/configdiff.py --gate-start 2026-08-07
if ($LASTEXITCODE -eq 1) { "Drift detected inside gate window" }

Drift Semantics

  • Drift is evaluated on configuration-bearing fields parsed from the settings export.
  • Volatile runtime fields are excluded from drift detection:
    • ExportTime
    • ConfigHash
    • CodeVersion
    • PortfolioStatus
  • The matrix still shows every parsed field so the full export remains visible.

Notes

  • The tool is read-only.
  • It does not import or reference any NinjaTrader or NT8 SDK assembly.
  • When ConfigHash matches but parameters differ, the report calls that out explicitly instead of trusting the hash.