Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.
What Is This Strategy?
Momentum Glide Pullback is a trend-continuation strategy built around two exponential moving averages (EMAs — averages that weight recent prices more heavily) and the Relative Strength Index (RSI — a momentum oscillator that measures the speed of price changes on a 0–100 scale). It is designed to trade with an already established trend rather than to predict tops and bottoms. The trading style here is a "pullback rider": instead of chasing a market that has already run, the strategy waits for a temporary dip inside a trend and then re-enters as momentum turns back in the trend's favour.
The core idea is patience. A trend is only recognised when a fast EMA sits above (or below) a slow EMA and the slow EMA's own slope agrees with that direction. Within such a trend, price often pauses and pulls back briefly before continuing. The strategy uses RSI to time that pause: it looks for RSI to cool back across its midline during the pullback, then to cross the midline again in the trend direction. That crossover — confirmed by a candle that closes back beyond the fast EMA — is what the strategy treats as a re-entry signal, or "glide," back into the move.
As a learning tool, Momentum Glide Pullback is well suited to traders who want to understand how trend filters and momentum oscillators can be combined to avoid counter-trend trades. It demonstrates multi-condition confirmation, mirrored logic for longs and shorts, and volatility-based risk scaling. It is best viewed as a study in disciplined, rules-based trend following — not as a shortcut to results.
How It Works
The strategy evaluates its rules once per newly closed bar and never acts on an unfinished candle. All conditions below refer to that most recently closed bar.
Trend filter (the context):
- For longs, the fast EMA must be above the slow EMA, and the slow EMA must be higher than it was
SlopeLookbackbars ago (a rising slope). - For shorts, the mirror applies: fast EMA below slow EMA, with the slow EMA falling.
- If neither condition holds, the market is treated as trendless and no trade is considered.
Entry signal — long:
- The trend filter confirms an uptrend.
- RSI on the prior bar was below the midline (
RsiMid, default 50) — evidence that a shallow pullback cooled momentum. - RSI on the current bar has crossed back up to or above the midline, signalling momentum turning back with the trend.
- RSI is still below the exhaustion cap (
RsiCap, default 72), so the market is not already overstretched. - The closed bar is bullish (close above open) and closes back above the fast EMA, reclaiming it.
Entry signal — short:
- The mirror image of the long conditions. The trend must be down, RSI must have popped above the mirrored midline (100 −
RsiMid) and then crossed back below it, remain above the mirrored cap, and the bar must be bearish and close below the fast EMA.
Position management:
- Only one position per magic number is allowed at a time, so the strategy will not stack multiple trades in the same direction.
Stop-loss logic:
- Stops are volatility-scaled using the Average True Range (ATR — a measure of recent price range). For a long, the stop is placed
AtrSlMult × ATRbelow the entry price; for a short, the same distance above. Wider markets get wider stops automatically.
Take-profit logic:
- The target is set at
AtrTpMult × ATRfrom entry (above for longs, below for shorts). With the defaults (1.8 for the stop, 3.0 for the target), the strategy aims for a reward-to-risk ratio of roughly 1.67 to 1 before costs.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| EmaFast | 20 | 5 | 60 | Period of the fast EMA used to define the near-term trend and the reclaim level for entries. |
| EmaSlow | 50 | 20 | 200 | Period of the slow EMA that anchors the broader trend direction. |
| SlopeLookback | 5 | 1 | 20 | How many bars back the slow EMA is compared against to confirm its slope is rising or falling. |
| RsiPeriod | 14 | 5 | 30 | Number of bars used to calculate the RSI momentum oscillator. |
| RsiMid | 50.0 | 40 | 60 | The RSI midline that must be re-crossed in the trend direction to trigger an entry. |
| RsiCap | 72.0 | 60 | 85 | Exhaustion cap; entries are skipped if RSI is already this high (or its mirror for shorts). |
| AtrPeriod | 14 | 5 | 30 | Number of bars used to calculate ATR for stop and target distances. |
| AtrSlMult | 1.8 | 0.5 | 5.0 | Multiplier applied to ATR to set the stop-loss distance from entry. |
| AtrTpMult | 3.0 | 0.5 | 8.0 | Multiplier applied to ATR to set the take-profit distance from entry. |
| Lots | 0.10 | 0.01 | 2.0 | Fixed order volume, in lots, used for each trade. |

Recommended Chart Settings
Momentum Glide Pullback is a general-purpose trend-continuation strategy, and its ATR-scaled stops and targets are specifically intended to adapt to whatever symbol and timeframe you attach it to. A common starting point for testing this style is a liquid major forex pair such as EUR/USD on the H1 (one-hour) timeframe, where trends develop cleanly enough for the EMA filter to be meaningful and pullbacks are frequent enough to generate signals.
That said, the defaults are a starting point, not a prescription. The EMA periods, RSI thresholds, and ATR multipliers may all behave very differently across instruments and timeframes, and results will vary considerably across changing market conditions. Always test the strategy on your chosen symbol and timeframe in a risk-free demo environment before drawing any conclusions.
How to Install on MetaTrader 5
- Download the
MomentumGlidePullback.ex5file from the link below. - Copy it to your MT5
MQL5\Expertsfolder. - Restart MetaTrader 5 or refresh the Navigator panel.
- Drag the EA onto a chart matching the recommended symbol and timeframe.
- Configure the input parameters and enable Algo Trading.
What to Consider Before Using This EA
Strengths of this approach. Trading in the direction of an established trend, and only after momentum confirms a resumption, is a time-tested framework that helps avoid the common mistake of fading strong moves. The dual EMA filter with a slope requirement is stricter than a simple crossover, which historically reduces the number of trades taken in choppy, directionless conditions. The RSI exhaustion cap adds a further filter that keeps the strategy from entering after momentum has already stretched. Because stops and targets scale with ATR, risk distances adapt to volatility instead of being fixed in pips.
Known limitations. Every pullback strategy faces the same core challenge: distinguishing a shallow, healthy pullback from the beginning of a genuine reversal. This strategy has no way of knowing which it is looking at — it simply acts on the rules. Moving averages are lagging by nature, so the trend filter can keep signalling "uptrend" even as a top forms. RSI midline crosses can also cluster and produce whipsaw entries during sideways drift that only looks like a trend.
Where it may underperform. In ranging or news-driven markets, the EMA structure can flip back and forth, generating signals that are quickly stopped out. Sharp gaps and low-liquidity sessions can push fills away from the intended entry, distorting the ATR-based risk math. Fixed lot sizing does not adjust to account equity, so drawdowns can compound if left unmanaged. Treat this EA as a framework to study and stress-test, not as a set-and-forget solution.
Risk Management Tips
Sound risk management matters far more than any single entry rule. Consider these general principles:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position. Because this EA uses a fixed lot size, you may need to adjust the
Lotsvalue so that the ATR-based stop distance corresponds to that fraction on your account. - Understand your drawdown tolerance. Even a well-designed trend strategy will endure losing streaks. Know how many consecutive losses you could face and whether your account and mindset can withstand them.
- Always start on a demo account. Test the strategy thoroughly in a simulated environment across different market conditions before considering any live capital.
- Account for costs. Spreads, commissions, and slippage all eat into a reward-to-risk ratio, especially on shorter timeframes.
- Never trade with money you cannot afford to lose, and consider position sizing as your primary tool for surviving long enough to learn.
Risk Warning
Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.
Downloads
- Expert Advisor: MomentumGlidePullback.ex5 (0 downloads)
- Source Code: MomentumGlidePullback.mq5 (0 downloads)
- Documentation: MomentumGlidePullback.pdf (0 downloads)