MACrossover Regime Filtered
- 专家
- 版本: 1.0
- 激活: 5
Regime-Filtered MA Crossover — Trade Only When the Trend Actually Confirms
A classic EMA(10)/EMA(30) crossover strategy, upgraded with a built-in market-regime filter that blocks entries when the market isn't actually trending — instead of firing on every crossover regardless of context.
Why this EA is different
Most simple crossover EAs perform well in strong trends and bleed money in choppy, sideways conditions — because they can't tell the difference. This EA adds a lightweight regime classifier (ADX + ATR + moving-average slope) that checks whether the market is genuinely trending before allowing a trade, and skips the signal entirely if it isn't.
Backtested results (XAUUSD, H1, 1-year period)
- Unfiltered crossover: Profit Factor 0.95, Max Drawdown 14.28%
- With regime filter enabled: Profit Factor 1.52, Max Drawdown 4.93%
(Past performance shown from Strategy Tester backtests does not guarantee future results. Always test on a demo account with your own risk settings before trading live.)
Key features
- Toggleable regime filter — compare filtered vs. unfiltered behavior with one input
- Four selectable filter modes (ablation-tested) so you can tune sensitivity per instrument
- Clean, commented source logic — no black box
- Configurable stop-loss, take-profit, and lot size
- Works on any symbol/timeframe — recommended starting point: H1
Inputs
- FastMA / SlowMA — crossover periods
- LotSize — fixed lot size per trade
- StopLossPoints / TakeProfitPoints — risk management
- UseRegimeFilter — enable/disable the regime gate
- TrendMode — Full / ADX only / Slope only / ADX+Slope
Recommended use
Best suited for trending instruments (metals, indices, major FX pairs) on H1 or higher. Always re-optimize the filter thresholds for your chosen symbol before going live — defaults were tuned on XAUUSD H1.
