Individual MT5 EA · Version 1.00

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.

EMA pullback and ATR Expert Advisor illustration
Completed-bar algorithm

Exact entry logic

  1. Long context requires EMA 50 above EMA 200, price above EMA 200 and ADX 14 at or above 20.
  2. The prior completed candle must touch and close at or below EMA 50.
  3. The latest completed candle must reclaim and close above EMA 50. Short conditions are mirrored.
  4. Spread, trade-window, daily-lock and one-position-per-symbol checks must pass.
  5. Initial stop is 2 ATR 14; target is 2R. Position size is estimated from the stop in account currency.
Defaults

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.

Rationale

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.

Failure modes

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.

Validation

Install and test

  1. Extract this ZIP and copy the EA files to MQL5/Experts.
  2. Refresh Navigator, attach it and review symbol specifications.
  3. Backtest with variable spread, commission and slippage; retain a later out-of-sample period.
  4. Forward-test on demo and record drawdown, consecutive losses, trade count and sensitivity.
Integrity

Auditable release

Version 1.00 compiled with 0 errors and 0 warnings. ZIP SHA-256: 42bd4fe75b2b9397d89493dee61442d469b9b9637a097a64e5e4de37e214311d. Broader trend research: Time Series Momentum.

Sponsored broker link

Open an account with HFM

Compare regulation, costs and account conditions independently.

Open an account with HFM

We may receive compensation from qualifying HFM registrations. Leveraged trading is high risk. Educational software, not personal advice.