[GAP-048]: reject taxonomy split complete

- NT8StrategyBase.cs: split overloaded runtime reject reasons

- SimpleORBStrategy.cs: split regime veto from grade filter

- parsers.py: keep split blocking reasons visible in dashboard KPIs

- SimpleORBRejectionLoggingTests.cs: cover GradeFilter, RegimeVeto, and line format

- docs/00-governance: record final vocabulary and validation evidence

Build: clean | Tests: 516 passing; Core 427 passing | Deploy: backup 20260823_142014
This commit is contained in:
2026-08-23 14:23:04 -04:00
parent 80c5f53bb9
commit e36534b641
9 changed files with 129 additions and 30 deletions

View File

@@ -871,7 +871,7 @@ namespace NinjaTrader.NinjaScript.Strategies
if (AccountStartingBalance <= 0.0)
{
LogRejectRateLimited("TrailingDrawdownBreach", "EnableTrailingDrawdown=True but AccountStartingBalance is not configured", Time[0]);
LogRejectRateLimited("TrailingDrawdownNotConfigured", "EnableTrailingDrawdown=True but AccountStartingBalance is not configured", Time[0]);
return true;
}
@@ -1946,7 +1946,7 @@ namespace NinjaTrader.NinjaScript.Strategies
Print(string.Format("[SDK] Portfolio blocked: {0}", portfolioDecision.RejectReason));
if (_logger != null)
_logger.LogWarning("Portfolio risk blocked order: {0}", portfolioDecision.RejectReason);
LogRejectRateLimited("KillSwitch", string.Format("Portfolio blocked: {0}", portfolioDecision.RejectReason), Time[0]);
LogRejectRateLimited("PortfolioRisk", string.Format("Portfolio blocked: {0}", portfolioDecision.RejectReason), Time[0]);
return;
}
@@ -1955,14 +1955,14 @@ namespace NinjaTrader.NinjaScript.Strategies
{
if (EnableVerboseLogging)
Print(string.Format("[SDK] Long trade filtered by direction setting: {0}", intent.Symbol));
LogRejectRateLimited("GradeFilter", string.Format("EnableLongTrades=False Symbol={0}", intent.Symbol), Time[0]);
LogRejectRateLimited("LongTradesDisabled", string.Format("EnableLongTrades=False Symbol={0}", intent.Symbol), Time[0]);
return;
}
if (intent.Side == SdkOrderSide.Sell && !EnableShortTrades)
{
if (EnableVerboseLogging)
Print(string.Format("[SDK] Short trade filtered by direction setting: {0}", intent.Symbol));
LogRejectRateLimited("GradeFilter", string.Format("EnableShortTrades=False Symbol={0}", intent.Symbol), Time[0]);
LogRejectRateLimited("ShortTradesDisabled", string.Format("EnableShortTrades=False Symbol={0}", intent.Symbol), Time[0]);
return;
}
@@ -1976,7 +1976,7 @@ namespace NinjaTrader.NinjaScript.Strategies
Print(string.Format("[SDK] Risk REJECTED: {0}", riskDecision.RejectReason));
if (_logger != null)
_logger.LogWarning("Intent rejected by risk manager: {0}", riskDecision.RejectReason);
LogRejectRateLimited("KillSwitch", string.Format("Risk manager rejected: {0}", riskDecision.RejectReason), Time[0]);
LogRejectRateLimited("MaxTradeRisk", string.Format("Risk manager rejected: {0}", riskDecision.RejectReason), Time[0]);
return;
}
@@ -1996,7 +1996,7 @@ namespace NinjaTrader.NinjaScript.Strategies
{
if (EnableVerboseLogging)
Print(string.Format("[SDK] Size too small: {0} < {1}", sizingResult.Contracts, MinContracts));
LogRejectRateLimited("GradeFilter", string.Format("Size too small Contracts={0} MinContracts={1}", sizingResult.Contracts, MinContracts), Time[0]);
LogRejectRateLimited("SizeBelowMinContracts", string.Format("Size too small Contracts={0} MinContracts={1}", sizingResult.Contracts, MinContracts), Time[0]);
return;
}
@@ -2031,7 +2031,7 @@ namespace NinjaTrader.NinjaScript.Strategies
Print(String.Format("[SDK] Circuit breaker OPEN — order blocked: {0}", cbState.Reason));
if (_logger != null)
_logger.LogWarning("Circuit breaker blocked order: {0}", cbState.Reason);
LogRejectRateLimited("KillSwitch", string.Format("Circuit breaker open: {0}", cbState.Reason), Time[0]);
LogRejectRateLimited("CircuitBreaker", string.Format("Circuit breaker open: {0}", cbState.Reason), Time[0]);
return;
}
}

View File

@@ -610,7 +610,7 @@ namespace NT8.Strategies.Examples
{
if (_logger != null)
_logger.LogInformation("Short vetoed by regime filter: AVWAP slope {0:F4} > 0 (bullish)", slopeVal);
RecordSignalRejection(context, "GradeFilter", string.Format("Regime veto before score; Side={0} AVWAPSlope={1:F4} EnableShortTrendFilter=True", candidate.Side, slopeVal), bar.Time);
RecordSignalRejection(context, "RegimeVeto", string.Format("Regime veto before score; Side={0} AVWAPSlope={1:F4} EnableShortTrendFilter=True", candidate.Side, slopeVal), bar.Time);
return null;
}
}
@@ -619,7 +619,7 @@ namespace NT8.Strategies.Examples
// Long veto in bearish regime - always enforced (no parameter for this yet)
if (_logger != null)
_logger.LogInformation("Trade vetoed: AVWAP slope {0:F4} against {1} direction", slopeVal, candidate.Side);
RecordSignalRejection(context, "GradeFilter", string.Format("Regime veto before score; Side={0} AVWAPSlope={1:F4}", candidate.Side, slopeVal), bar.Time);
RecordSignalRejection(context, "RegimeVeto", string.Format("Regime veto before score; Side={0} AVWAPSlope={1:F4}", candidate.Side, slopeVal), bar.Time);
return null;
}
}