diff --git a/signal_aggregator.py b/signal_aggregator.py index 3aea209..6a71ed7 100755 --- a/signal_aggregator.py +++ b/signal_aggregator.py @@ -74,6 +74,7 @@ class SignalReport: spread_estimate: float = 0.0 market_regime: str = "" volatility_regime: str = "" + exhaustion_count: int = 0 class SignalAggregator: @@ -547,6 +548,8 @@ class SignalAggregator: is_buy = report.final_score >= 0 quality_scale = self._TP_QUALITY_SCALE.get(report.signal_quality, 0.75) + if report.signal_quality == "A" and report.exhaustion_count >= 2: + quality_scale = 1.0 tp_mult = cfg.tp_atr_multiplier * quality_scale if is_buy: @@ -732,6 +735,7 @@ class SignalAggregator: # price is extended AND momentum indicators confirm deceleration. _EXHAUSTION_TAGS = {"exhaustion", "no_pullback", "rsi_extended", "bb_overextended"} exhaustion_count = sum(1 for name, _ in penalties if name in _EXHAUSTION_TAGS) + report.exhaustion_count = exhaustion_count momentum_fading = False if primary is not None and exhaustion_count >= 2: roc_ind = primary.indicators.get("roc")