Dual EMA Crossoverwith EMA-200 regime filter
The crossover of the 20 and 50 EMAs gives direction. The 200 EMA is a regime filter — you trade only in the direction the long-term slope agrees with.
The biggest cost in any crossover system is counter-trend whipsaw. The whole job of the 200 EMA filter is to keep you trading only in periods where there is evidence of drift.
- Category
- Trend Following · Indicator-based
- Timeframe
- H4 primary · D1 secondary
- Suitable pairs
- EURUSD · GBPUSD · USDJPY · AUDUSD · USDCAD · XAUUSD
- Session
- Signal at the bar close · execute in London or New York
- Indicators / tools
- EMA(20) · EMA(50) · EMA(200) · ATR(14)
Valid setup
Exact rules
Entry
- Regime gate: close above EMA(200) and the EMA(200) sloping up — its value now above its value ten bars ago. That is a long-only window. The reverse for shorts.
- Trigger: EMA(20) crosses above EMA(50) on a closed bar.
- Enter at the next bar's open.
- If the crossover goes against the regime, ignore the signal completely. That is what the filter is for.
Stop loss
- Entry − 1.5 × ATR(14) for a long.
- Alternative: 0.5 × ATR beyond the far side of the EMA(50) — use whichever is wider.
- Risk 0.5%–1% per trade.
Take profit / exit
- The primary exit is a signal: the opposite EMA(20)/EMA(50) crossover.
- Secondary: if price closes on the wrong side of the EMA(200), the regime has broken — exit.
- A fixed target at 2R is optional as a partial. But note that a fixed target lowers this system's expectancy, because the payoff distribution is fat-tailed.
Build Dual EMA Crossover
Reading this page is free and always will be. Taking it is what costs — the complete MQL5 for the rules above, yours to keep, permanently. Five of them cost $10 and they never expire.
More from Foundations
Trading carries risk and most retail accounts lose money. Nothing on this page is financial advice or a recommendation to trade. The chart is an illustration of the rules on constructed candles — it is not a record of a trade and not a backtest.
