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 Swing Step Trend Rider is a pure price-action, trend-following pullback strategy for MetaTrader 5 that uses confirmed swing pivots — not a single technical indicator — to read market structure. There is no moving average, RSI, ATR, or channel anywhere in its logic. Instead, it measures the raw highs and lows of closed candles to identify swing points, and from those swing points it determines whether a market is trending and where a healthy pullback has occurred.
The core idea is built on a classic observation: a healthy trend tends to climb (or fall) like a staircase. There is an impulse leg in the direction of the trend, a small counter-trend pullback, and then a resumption. Rather than chasing a breakout to new highs or lows, the Swing Step Trend Rider waits to "buy the dip" in an uptrend or "sell the rip" in a downtrend — entering the moment the trend appears to resume. A pullback simply means a temporary move against the prevailing trend, and a swing pivot is a local high or low that stands out from the bars around it.
As a learning tool, this strategy is well suited to traders who want to understand market structure and Dow Theory without leaning on lagging indicators. It is designed for trending market conditions and is most at home on a liquid instrument such as a forex major or a metal. Because every rule is based on candle structure, studying it can help you see why a trend continuation setup forms, which is valuable knowledge regardless of which tools you eventually use. It is framed here as a strategy analysis, not a profit opportunity.
How It Works
The strategy evaluates its rules once per newly-closed bar and only ever holds one position at a time per magic number, letting the structural stop and target manage each trade to completion. Here is how it identifies a setup:
- Swing pivots (structure): The strategy scans closed candles to find confirmed swing highs and swing lows. A swing high is a bar whose high is the strict maximum over
SwingStrengthbars on each side; a swing low is the strict minimum overSwingStrengthbars on each side. A pivot is only used once it is confirmed — meaning it has enough bars to its right — so the structure never repaints (it does not change after the fact). - Trend filter (Dow Theory): Using the last two swing highs and the last two swing lows, the strategy classifies the trend. An uptrend requires higher highs and higher lows (HH + HL). A downtrend requires lower highs and lower lows (LH + LL). If neither condition is met, no trade is considered.
- Long entry — buy the dip: In a confirmed uptrend, the strategy signals a long when the previous
PullbackBarscandles formed a genuine dip (the last pullback bar closed bearish and dipped below the bar just before the pullback began), and the just-closed "signal" bar resumes by closing bullishly back above the entire pullback's high. - Short entry — sell the rip: In a confirmed downtrend, the strategy signals a short when the previous
PullbackBarscandles formed a rally (the last pullback bar closed bullish and poked above the bar just before the rally began), and the just-closed signal bar resumes by closing bearishly back below the entire pullback's low. - Stop-loss logic (structural): The stop is placed just beyond the pullback extreme the trade is bouncing off — below the dip low for longs, above the rally high for shorts. It is buffered by a fraction of the active swing range (
StopBufferFrac), so the stop distance automatically scales to any symbol or timeframe without needing a fixed point size. - Take-profit logic: The target is set at a fixed reward-to-risk multiple (
RewardRatio) of that structural stop distance. By defining risk first and projecting the reward as a multiple of it, the approach is built to let trend winners run while keeping the loss on any single trade defined in advance.
In plain terms: the strategy waits for structure to confirm a trend, waits for a dip or rally within that trend, and then signals an entry only when price closes in a way that may indicate the trend is resuming. It is a continuation method, not a breakout method.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SwingStrength | 2 | 1 | 5 | Number of bars required on each side of a candle for it to qualify as a confirmed swing pivot. Higher values demand more pronounced, slower-forming pivots. |
| PullbackBars | 2 | 1 | 4 | How many candles the counter-trend pullback may span before the resumption (signal) bar. Larger values allow deeper, longer pullbacks. |
| StopBufferFrac | 0.10 | 0.00 | 1.00 | Extra stop-loss buffer placed beyond the pullback extreme, expressed as a fraction of the current swing range. Larger values give the trade more room. |
| RewardRatio | 2.00 | 1.00 | 6.00 | Take-profit distance as a multiple of the structural stop distance. A value of 2.00 targets twice the risk. |
| Lots | 0.10 | 0.01 | 1.00 | Trade volume in lots for each position. |
| Magic | 8207 | 0 | 9,999,999 | Unique identifier the EA uses to recognise and manage only its own trades. |

Recommended Chart Settings
The Swing Step Trend Rider was designed with a trending forex major or metal in mind — for example EURUSD or XAUUSD — on the H1 (1-hour) timeframe. That said, the logic is timeframe-agnostic: because the stop and target scale to the measured swing range rather than a fixed pip distance, the strategy runs on whatever symbol and timeframe you apply it to.
Keep in mind that no single setting is optimal everywhere. Trend-following structure behaves differently across instruments, sessions, and volatility regimes, so results will vary across different market conditions. Treat the H1 default as a starting point for study rather than a fixed prescription, and review how the rules behave on your chosen market before drawing conclusions.
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 involves trade-offs, and an honest assessment helps you study this one effectively.
Strengths. The approach is transparent and rules-based: because it relies only on swing structure and candle closes, there is nothing hidden behind indicator smoothing or repainting. The non-repainting pivot logic means a signal that appears in history would have appeared in real time too. The structural, range-scaled stop adapts to volatility automatically, and defining the target as a multiple of risk imposes a consistent reward-to-risk framework on every trade.
Known limitations. This is a trend-continuation method, so it is built for trending conditions and will tend to struggle in choppy, range-bound, or sideways markets where false swings and failed resumptions are common. The Dow Theory filter is structurally sound but inherently lagging — by the time two higher highs and higher lows are confirmed, a portion of the move may already be behind. Pullback entries can also be whipsawed when a "resumption" bar closes in the trend direction only to reverse on the next bar. And like any single-position system, it will sit out fresh signals while a trade is open, potentially missing other setups.
Where it may underperform. Expect more difficulty during low-volatility consolidations, around major news releases that distort candle structure, and on instruments or timeframes where price action is noisy. None of this makes the strategy "good" or "bad" — it simply means the method has conditions it favours, and recognising those conditions is part of using it intelligently. Always test thoroughly before relying on any automated system.
Risk Management Tips
Sound risk management matters far more than any single entry rule. As you study this strategy, keep these general principles in mind:
- Risk a small, fixed fraction per trade. Many educational sources suggest risking no more than 1–2% of account equity on any single position. Size your
Lotsso that the distance to the structural stop represents that small fraction, rather than picking a lot size arbitrarily. - Test on a demo account first. Run the EA on a demo or simulation account until you understand how it behaves across different market conditions before considering any live deployment.
- Understand drawdown. Even a well-designed trend-following method will go through losing streaks during ranging markets. Know the maximum drawdown you are willing to tolerate, and remember that a string of losses is a normal part of any strategy's distribution of outcomes.
- Account for trading costs. Spread, commission, and slippage all affect real results, especially on lower timeframes — factor them into any evaluation.
- Avoid over-optimisation. Tuning parameters until historical results look ideal often produces a strategy that fits the past but generalises poorly. Favour robust, simple settings.
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: SwingStepTrendRider.ex5 (0 downloads)
- Source Code: SwingStepTrendRider.mq5 (0 downloads)
- Documentation: SwingStepTrendRider.pdf (1 downloads)