Fix stop/target ordering, P&L wiring, dynamic targets, confluence wiring
Some checks failed
Build and Test / build (push) Has been cancelled
Some checks failed
Build and Test / build (push) Has been cancelled
- Move SetStopLoss/SetProfitTarget before EnterLong/EnterShort in SubmitOrderToNT8(). NT8 requires stop/target pre-registered to the signal name before entry fires — calling after caused silent fallback to strategy defaults in backtest, nullifying all dynamic target scaling. Add [dynamic] tag to SUBMIT log line for observability. - Wire OnPositionUpdate() in NT8StrategyBase to call _riskManager.OnPnLUpdate() and PortfolioRiskManager.ReportPnL() on every position change. Daily loss limit checks were evaluating against PnL permanently — safety net now live. - Fix BasicRiskManager.CheckEmergencyConditions() hardcoded 1000 limit. Add dailyLossLimit constructor overload; emergency halt now fires at 90% of the configured DailyLossLimit, not a hardcoded . - Add AVWAP slope hard veto in SimpleORBStrategy.OnBar(). Trend=0.00 (AVWAP working against trade direction) can no longer pass grade filter. Pre-scoring veto prevents high gap/volume scores from masking a directionally broken setup. - Raise default MinTradeGrade from 4 (B) to 5 (A) in both SimpleORBStrategy and SimpleORBNT8 defaults. - Scale TargetTicks dynamically in CreateIntent() based on ORB/ATR ratio (0.75x-1.75x of base target). Tight ORBs get extended targets; wide ORBs get tightened. Hard floor at stopTicks+4. - Add NarrowRange, OrbRangeVsAtr, GapDirectionAlignment, BreakoutVolumeStrength, PriorDayCloseStrength default weights in ConfluenceScorer constructor. All 10 factors now registered. - Fix session_open_price tracking for GapDirectionAlignment factor. TodayOpen in DailyBarContext now reflects first RTH bar open, not the breakout bar open. - Log all 10 factor scores at signal acceptance for observability.
This commit is contained in:
@@ -110,6 +110,11 @@ namespace NT8.Core.Intelligence
|
||||
_factorWeights.Add(FactorType.Volatility, 1.0);
|
||||
_factorWeights.Add(FactorType.Timing, 1.0);
|
||||
_factorWeights.Add(FactorType.ExecutionQuality, 1.0);
|
||||
_factorWeights.Add(FactorType.NarrowRange, 1.0);
|
||||
_factorWeights.Add(FactorType.OrbRangeVsAtr, 1.0);
|
||||
_factorWeights.Add(FactorType.GapDirectionAlignment, 1.0);
|
||||
_factorWeights.Add(FactorType.BreakoutVolumeStrength, 1.0);
|
||||
_factorWeights.Add(FactorType.PriorDayCloseStrength, 1.0);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user