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?
The Dual Rsi Momentum Shift is a trend-following momentum strategy built around a dual-RSI crossover — two Relative Strength Index (RSI) lines calculated on the same closing prices but with different look-back periods. RSI is a classic oscillator that measures the speed of recent price changes on a 0–100 scale, and a single RSI line is famously twitchy: it whipsaws around the middle in choppy conditions and often fires late at the extremes. By running a fast RSI against a slower RSI, the Dual Rsi Momentum Shift converts that raw oscillator into a smoothed momentum comparator. The fast line represents immediate momentum, the slow line represents the momentum baseline, and the moment they cross is treated as a shift in the underlying pressure.
This approach is designed for trending markets rather than range-bound conditions. It only looks to join momentum that agrees with a broader trend, using an Exponential Moving Average (EMA) — a moving average that weights recent prices more heavily — as a regime filter. When the fast RSI crosses above the slow RSI while price sits in a rising-EMA uptrend, the strategy interprets it as upward continuation. When the fast line crosses below the slow line inside a falling-EMA downtrend, it reads downward continuation. The idea is to treat the crossover as an early, filtered read on a momentum turn, not a signal to fade a strong trend.
As a learning tool, the Dual Rsi Momentum Shift suits traders who want to study how layering multiple confirmation gates on top of a common oscillator can filter noise. It is best viewed as a framework for understanding trend-continuation logic, oscillator crossovers, and volatility-scaled risk — not as a shortcut to results. Beginners can use it to see how entry filters interact, while more experienced traders may use it as a template for testing momentum ideas on a demo account.
How It Works
The Dual Rsi Momentum Shift evaluates its rules once per newly closed bar, comparing the previous bar's readings with the current bar's to detect a genuine crossover. Before any trade is taken, three independent gates must all agree — this is where the strategy's noise filtering comes from.
Entry conditions (long trade):
- Direction gate: The fast RSI crosses above the slow RSI between the prior bar and the current bar (an upward momentum shift).
- Momentum zone gate: The fast RSI is above the midline (in bullish territory) but still below the
MaxEntryRsicap, so the strategy avoids joining an already over-extended push. - Regime gate: The closing price is above the trend EMA and the EMA is sloping upward, confirming a rising-EMA uptrend.
Entry conditions (short trade):
- The fast RSI crosses below the slow RSI (a downward momentum shift).
- The fast RSI is below the midline but still above the mirrored short cap (
100 − MaxEntryRsi), avoiding over-stretched selling. - The closing price is below the trend EMA and the EMA is sloping downward, confirming a falling-EMA downtrend.
Stop-loss logic:
- Risk distance is scaled by the Average True Range (ATR), an indicator that measures recent volatility. The stop is placed
AtrMult × ATRaway from entry, so the stop automatically widens in volatile conditions and tightens in calm ones. This self-adapts to each symbol and timeframe.
Take-profit logic:
- The target is set at a fixed
RewardRatiomultiple of the stop distance. With the defaults, a stop of 1.6 × ATR pairs with a target of 1.7 × that distance, giving a reward-to-risk profile greater than 1:1.
Exit and trade management:
- The strategy holds only one position per magic number at a time and does not stack entries.
- If
ExitOnOppositeCrossis enabled, the open trade is closed early the moment the fast and slow RSI lines cross back the other way — the momentum thesis is considered void even before the stop or target is reached. - A spread filter (
MaxSpreadPoints) blocks new entries when the current spread is wider than the allowed limit, helping avoid poor fills during illiquid periods.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| FastRsiPeriod | 7 | 3 | 20 | Look-back period of the fast RSI — the immediate-momentum line. |
| SlowRsiPeriod | 21 | 10 | 50 | Look-back period of the slow RSI — the momentum baseline the fast line must cross. |
| EmaTrendPeriod | 50 | 20 | 200 | Period of the trend-regime EMA; price must be on the correct side and the EMA must slope the right way. |
| Midline | 50.0 | 45.0 | 55.0 | Momentum midline the fast RSI must be beyond to confirm bullish or bearish territory. |
| MaxEntryRsi | 72.0 | 60.0 | 85.0 | Upper cap for long entries (the short cap mirrors to 100 − this) to skip over-extended pushes. |
| AtrPeriod | 14 | 7 | 30 | ATR period used for stop and target scaling. |
| AtrMult | 1.6 | 0.5 | 5.0 | Stop distance as a multiple of ATR. |
| RewardRatio | 1.7 | 0.8 | 4.0 | Take-profit distance as a multiple of the stop distance. |
| ExitOnOppositeCross | 1 | 0 | 1 | 1 = close the trade on a reverse RSI cross; 0 = let the stop-loss or take-profit run. |
| MaxSpreadPoints | 30 | 1 | 200 | Skip a new entry if the current spread (in points) is wider than this. |
| Lots | 0.10 | 0.01 | 1.00 | Trade volume in lots. |
| Magic | 7042 | 0 | 9,999,999 | Unique magic number identifying trades placed by this EA. |

Recommended Chart Settings
The Dual Rsi Momentum Shift was designed with a liquid trending instrument in mind — such as EURUSD or XAUUSD (gold) — on the H1 (1-hour) timeframe. These markets tend to produce the sustained directional moves that a trend-continuation momentum system is built to follow, and H1 offers a balance between signal frequency and noise. Because entries, stops, and targets are all ATR-scaled, the strategy can technically be applied to other symbols and timeframes, but its character will change with each market's volatility and behavior. Results will vary considerably across different market conditions, and any new symbol or timeframe should be studied on a demo account first.
How to Install on MetaTrader 5
- Download the .ex5 file 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
Every strategy has trade-offs, and understanding them is part of trading responsibly.
Strengths of this approach:
- The dual-RSI crossover filters far more mid-range noise than a single RSI line or a raw RSI-50 cross, because both lines must genuinely diverge rather than merely brush a level.
- Requiring trend-regime agreement keeps entries aligned with the prevailing direction, historically reducing the counter-trend signals where naive oscillator systems tend to struggle.
- ATR-based stops and targets self-adapt to each market's volatility, so the risk framework does not need manual re-tuning for every symbol.
Known limitations:
- Like all trend-following systems, it can underperform in sideways or choppy markets, where the EMA slope flip-flops and crossovers produce repeated small losses.
- The
MaxEntryRsicap is designed to skip exhausted moves, but it can also filter out valid strong trends, meaning some large continuation moves may be missed. - Because it acts only on closed bars, entries occur after the bar completes, which may introduce slippage relative to the ideal signal price.
- The single-position rule limits exposure but also means the strategy cannot pyramid into a strong trend.
No set of filters removes losing trades entirely. The gates are intended to improve signal quality, not to eliminate risk, and the strategy may still experience losing streaks and drawdown periods.
Risk Management Tips
Sound risk management matters more than any single entry signal. Consider these general principles as you study the Dual Rsi Momentum Shift:
- Position sizing: Size each trade so that a full stop-loss represents only a small slice of your account. A common educational guideline is to risk no more than 1–2% of account equity per trade.
- Understand drawdown: Even a well-filtered strategy will have losing runs. Know the maximum peak-to-trough decline you are willing to tolerate before you begin, and stop to reassess if it is breached.
- Use a demo account first: Test the strategy on a demo or simulated account across varied market conditions before considering any live capital. This lets you observe behavior without financial exposure.
- Respect leverage: Leverage amplifies both gains and losses. Lower leverage gives you more room to survive adverse moves.
- Keep records: Log your trades and review them. Understanding why signals succeeded or failed teaches more than any single result.
- Never over-commit: Only ever allocate capital you can afford to lose, and treat automated trading as a tool that requires ongoing supervision, not a set-and-forget solution.
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: DualRsiMomentumShift.ex5 (2 downloads)
- Source Code: DualRsiMomentumShift.mq5 (2 downloads)
- Documentation: DualRsiMomentumShift.pdf (2 downloads)