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:
Harwinder
2026-05-07 19:28:19 -04:00
parent b7d03a9b61
commit a687db9413
4 changed files with 54 additions and 0 deletions
+5
View File
@@ -39,6 +39,11 @@ class Trade:
market_regime: str = "" # trending_up / trending_down / ranging
volatility_regime: str = "" # low / medium / high
mtf_agreement: bool = False
m15_score: float = 0.0
h1_score: float = 0.0
h4_score: float = 0.0
rsi_at_entry: float = 50.0
ema_distance_pct: float = 0.0 # (price - ema_trend) / ema_trend * 100
@dataclass