Add EMA200 distance gate — strongest single signal-quality filter
Across 2024 trend / 2023 chop / 2026 hostile windows, distance from the H1 EMA200 was empirically the most discriminative variable. Sweet spot 0.5-1.5% from EMA200; closer = false-breakout chop, farther = chase. Outside the band, confidence is multiplied by 0.55 so the trade falls below the B-grade threshold and is rejected. Cumulative return across the 3 windows: +13.88% baseline -> +35.50%. Win rate improved in every regime; 2023 chop turned positive (-2.56% to +14.94%). Also extends the trade journal with per-timeframe MTF scores, RSI at entry, and EMA200 distance for future filter mining; surfaces ema_trend in key_levels so the gate can read it.
This commit is contained in:
@@ -173,6 +173,11 @@ class TechnicalEngine:
|
||||
signal=signal, confidence=conf,
|
||||
description=desc, weight=1.2,
|
||||
)
|
||||
if t is not None:
|
||||
result.key_levels["ema_trend"] = float(t)
|
||||
result.key_levels["ema_fast"] = float(f)
|
||||
result.key_levels["ema_medium"] = float(m)
|
||||
result.key_levels["ema_slow"] = float(s)
|
||||
|
||||
def _compute_rsi(self, df: pd.DataFrame, result: TechnicalAnalysis):
|
||||
"""RSI with trend-adjusted interpretation."""
|
||||
|
||||
Reference in New Issue
Block a user