TF EMA Pullback ATR Assistant
A completed-bar H4 trend-pullback assistant using EMA 50/200 alignment, an EMA 50 reclaim, ADX strength and ATR-scaled exits.
One EA only: MQL5 source, EX5, README and SHA-256 checksums.

Exact entry logic
- Long context requires EMA 50 above EMA 200, price above EMA 200 and ADX 14 at or above 20.
- The prior completed candle must touch and close at or below EMA 50.
- The latest completed candle must reclaim and close above EMA 50. Short conditions are mirrored.
- Spread, trade-window, daily-lock and one-position-per-symbol checks must pass.
- Initial stop is 2 ATR 14; target is 2R. Position size is estimated from the stop in account currency.
Risk and execution controls
| Signal timeframe | H4 | Risk | 0.50%, hard maximum 1.00% |
|---|---|---|---|
| EMA pair | 50 / 200 | ADX | 14, minimum 20 |
| Stop / target | 2 ATR / 2R | Daily entry lock | 2.00% from EA/day reference |
| Maximum spread | 2 pips | Position guard | One per symbol |
No grid, martingale, recovery sizing or averaging down is used. Gaps, slippage and restarts can still make realized loss differ from the estimate.
Trend plus retracement
EMA alignment defines direction, the pullback attempts to avoid chasing an extended candle, ADX screens weak regimes and ATR normalizes exit distance. These are transparent operational choices—not independently proven parameters.
Where it can break down
Moving averages react late, ADX can stay elevated during reversal, and an EMA reclaim can fail. Multiple correlated pairs can create concentrated portfolio exposure.
Install and test
- Extract this ZIP and copy the EA files to
MQL5/Experts. - Refresh Navigator, attach it and review symbol specifications.
- Backtest with variable spread, commission and slippage; retain a later out-of-sample period.
- Forward-test on demo and record drawdown, consecutive losses, trade count and sensitivity.
Auditable release
Version 1.00 compiled with 0 errors and 0 warnings. ZIP SHA-256: 42bd4fe75b2b9397d89493dee61442d469b9b9637a097a64e5e4de37e214311d. Broader trend research: Time Series Momentum.
Open an account with HFM
Compare regulation, costs and account conditions independently.
We may receive compensation from qualifying HFM registrations. Leveraged trading is high risk. Educational software, not personal advice.
