Moving Average Pullback Trend Follower MT4
- Experts
- Versione: 1.20
- Aggiornato: 17 settembre 2026
- Attivazioni: 5
OVERVIEW
This EA trades in the direction of a trending moving average (MA). When the MA is rising (or falling) and price has pulled back to touch the MA, the EA enters in the direction of the established trend. Confirms the pattern only after a bar has fully closed, then enters on the next bar - a look-ahead-free design. Forex only.
ENTRY LOGIC (based on fully closed bars only)
- The MA on the most recently closed H4 bar is rising over a configurable lookback period (slope filter)
- That closed bar's body (open/close) stays above the MA (confirms the uptrend is intact)
- That closed bar's low touched the MA
- Once confirmed, the EA enters near the next bar's open - not reactively mid-bar. Because the decision only uses fully closed, known bar data, backtest behavior matches live behavior exactly (no repainting, no look-ahead bias)
- The mirror image applies for downtrends (pullback sell)
Stop loss and take profit are fixed pip distances, automatically set on every entry. A gap guard also skips entry on bars where the price gap from the prior bar is too large.
KEY FEATURES
- Decisions are based only on fully closed bars - no repainting, no look-ahead bias, backtest results are achievable live
- Every parameter is a configurable input - works on any Forex symbol/timeframe
- Lot size is automatically normalized to your broker's min/max lot and lot step
- Stop loss / take profit levels are automatically adjusted to respect your broker's minimum stop distance
- Gap guard (MaxGapPips) avoids unfavorable entries after large price gaps
INPUTS
MAPeriod: Moving average period (bars)
SlopeLookback: Bars back used to judge the MA's slope
StopPips: Stop loss distance (pips)
TakePips: Take profit distance (pips)
Lots: Order volume
MagicNumber: Unique identifier for this EA instance
Slippage: Allowed slippage (pips)
MaxGapPips: Gap guard threshold (pips, 0 to disable)
Timeframe: Timeframe to trade on
EXAMPLE BACKTEST RESULTS (for reference)
Recommended settings (MAPeriod=200, SlopeLookback=15, StopPips=180, TakePips=100), H4 timeframe, tested April 2024 to September 2026 (about 2.4 years, historical tick-data simulation). This is a starting point for your own testing, not a guarantee of future performance.
USDJPY: 36 trades, win rate 77.8%, total P/L +1,982 pips, PF 2.37, max DD 724 pips
EURJPY: 40 trades, win rate 82.5%, total P/L +2,074 pips, PF 2.63, max DD 426 pips
PF (Profit Factor) = Gross Profit / Gross Loss. Max DD is the largest peak-to-trough drop in cumulative pips during the test period. Both pairs above were confirmed positive on both the in-sample training period and the out-of-sample test period. GBPJPY was also tested but excluded from the recommendation, as its test-period result was slightly negative.
IMPORTANT DISCLAIMER (please read)
- Any backtest results referenced in this listing are simulations based on historical data, not live trading records.
- Past performance does not guarantee future results.
- Forex trading involves a risk of loss of capital. Use this product at your own discretion and risk tolerance.
- Real-world factors (spread, slippage, requotes) can cause live results to differ from backtest results.
- Always test on a demo account before live trading.
REQUIREMENTS
- MetaTrader 4 (MQL4) / MetaTrader 5 (MQL5)
- Recommended: ECN-style broker with low spreads
- Recommended symbols: USDJPY, EURJPY (H4 timeframe)
