[GAP-059]: ORB range telemetry context complete

- SimpleORBNT8.cs: source telemetry ORB range from SDK opening range tracker

- SimpleORBNT8DefaultsTests.cs: guard against dead adapter ORB fields and verify SDK source

- OrbConfluenceFactorTests.cs: prove realistic ORB range ticks produce ratio reason

- SPRINT_BOARD.md and decisions.md: record implementation and deploy blocker

Build: clean | Tests: 545 passing; Core 456 passing | Dual-deployed: no - NinjaTrader.exe PID 18800 locked NT8.Core.dll
This commit is contained in:
2026-08-25 10:10:27 -04:00
parent 6c672a5247
commit 7e82b2ce5a
6 changed files with 190 additions and 4 deletions

View File

@@ -43,6 +43,20 @@ namespace NT8.Core.Tests.Adapters
Assert.IsTrue(method.Contains("daily.BreakoutBarVolume = (double)barData.Volume;"), "Telemetry clone must use current bar volume for breakout-volume scoring.");
}
[TestMethod]
public void OnBarUpdate_DailyContextOrbRange_UsesSdkOpeningRangeTracker()
{
string source = File.ReadAllText(FindSourceFile());
string method = ExtractMethodBlock(source, "protected override void OnBarUpdate");
Assert.IsTrue(method.Contains("SdkSimpleORB sdkOrb = _sdkStrategy as SdkSimpleORB;"), "Daily context must read the live SDK-side ORB tracker.");
Assert.IsTrue(method.Contains("double orbHigh = (sdkOrb != null && sdkOrb.OpeningRangeReady) ? sdkOrb.OpeningRangeHigh : 0.0;"), "Daily context must use SDK ORB high only after the range is ready.");
Assert.IsTrue(method.Contains("double orbLow = (sdkOrb != null && sdkOrb.OpeningRangeReady) ? sdkOrb.OpeningRangeLow : 0.0;"), "Daily context must use SDK ORB low only after the range is ready.");
Assert.IsTrue(method.Contains("orbRangeTicks = Math.Round((orbHigh - orbLow) / tickSize);"), "Daily context must compute ORB range ticks from SDK high/low.");
Assert.IsFalse(source.Contains("_openingRangeHigh"), "Legacy adapter ORB high field must stay removed because the SDK tracker owns this state.");
Assert.IsFalse(source.Contains("_openingRangeLow"), "Legacy adapter ORB low field must stay removed because the SDK tracker owns this state.");
}
private static string FindSourceFile()
{
DirectoryInfo dir = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);