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?
Cadence Shift Runner is a pure price-action, candlestick momentum-continuation strategy for MetaTrader 5. Unlike most expert advisors, it uses no technical indicators at all — no moving averages, no RSI, no MACD. Every decision is derived directly from the raw open, high, low, and close (OHLC) values of the candles on a single chart timeframe. In trading terms, this makes it a "naked chart" or price-action system, the same school of reading the market that discretionary traders use when they study candle bodies, wicks, and the rhythm of a trend.
The strategy is built around a simple, recognizable market behavior: a strong directional push, a brief pause, and then a resumption in the same direction. Traders often call this a momentum continuation or trend pullback pattern. The name itself describes the three-stage logic — cadence (a clean burst of momentum), shift (a shallow pause or pullback), and run (the breakout that resumes the move). Because it waits for an established impulse before acting, it is designed for trending or expanding market conditions rather than quiet, sideways ranges.
As a learning tool, Cadence Shift Runner is well suited to traders who want to understand how momentum and structure can be defined objectively in code. It demonstrates how concepts like "body dominance," "shallow retracement," and "structural stop placement" — ideas that are often taught loosely in price-action courses — can be turned into precise, testable rules. It is best treated as a study of continuation logic, not as a shortcut to results.
How It Works
The strategy continuously scans completed candles and arms a breakout trigger only when a full continuation setup is present. Here is the logic in plain English, broken into its three stages.
Stage 1 — Cadence (the momentum impulse):
- The strategy looks for a streak of
StreakLenconsecutive candles all closing in the same direction (all bullish for a long setup, all bearish for a short). - Each candle's body (the open-to-close distance) must dominate its full range (high-to-low). The average body-to-range ratio across the streak must be at least
BodyRatio, which filters out weak, wick-heavy candles and favors conviction. - The total size of the impulse leg must be large relative to recent volatility — at least
MinImpulseRangeMulttimes the average candle range measured overRangeLookbackbars. This confirms a genuine expansion in price, not background noise.
Stage 2 — Shift (the shallow pullback):
- After the impulse, the strategy allows a brief pause of 1 to
PullbackBarscandles. - The pullback must not exceed the impulse's extreme (the high for a long, the low for a short) — meaning price has not yet broken out.
- The pullback must stay shallow: it cannot retrace deeper than
RetraceMaxof the impulse leg. A pullback that gives back too much of the move suggests the momentum has failed.
Stage 3 — Run (the breakout entry):
- The strategy arms a trigger just beyond the impulse extreme, offset by a small buffer (
StopBufferMult× average range). - When live price resumes through that trigger, the strategy signals an entry in the direction of the original impulse.
- If price instead falls back through the pullback extreme before triggering, the setup is considered "busted" and is disarmed.
- An armed setup is only valid for
ExpiryBarsbars. If the breakout does not occur in time, the setup expires.
Stop-loss logic: The stop is placed beyond the pullback extreme (below the pullback low for a long, above the pullback high for a short), again with the small buffer applied. This is structure-based placement — the stop sits where the setup would be logically invalidated.
Take-profit logic: The target is set as a reward-to-risk multiple. The distance from entry to stop defines one unit of risk, and the take-profit is placed RewardRisk times that distance away from entry.
Breakeven management: Optionally, once price advances BreakEvenAtR multiples of the initial risk in your favor, the stop is moved to the entry price to reduce exposure on the open trade. Setting this to 0 disables the feature. The strategy holds only one position per magic number at a time.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| StreakLen | 3 | 2 | 6 | Number of consecutive same-direction candles required to form the momentum impulse (the "cadence"). |
| BodyRatio | 0.55 | 0.30 | 0.80 | Minimum average body-to-range ratio of the impulse candles; higher values demand stronger, more decisive candles. |
| MinImpulseRangeMult | 1.5 | 0.8 | 3.0 | Minimum impulse leg size as a multiple of the recent average candle range; filters for genuine momentum expansion. |
| RetraceMax | 0.62 | 0.30 | 0.85 | Maximum allowed pullback depth as a fraction of the impulse leg; keeps the pause shallow. |
| PullbackBars | 2 | 1 | 4 | Maximum number of pause/pullback candles the strategy will scan after the impulse. |
| RewardRisk | 1.8 | 0.8 | 4.0 | Take-profit distance expressed as a reward-to-risk multiple of the stop distance. |
| StopBufferMult | 0.10 | 0.0 | 0.5 | Buffer added to the trigger and stop, expressed as a multiple of average range. |
| RangeLookback | 20 | 10 | 50 | Number of bars used to compute the average candle range (the volatility baseline). |
| ExpiryBars | 3 | 1 | 8 | Number of bars an armed setup stays valid before it expires unfilled. |
| BreakEvenAtR | 1.0 | 0.0 | 3.0 | Move the stop to entry after price advances this many multiples of risk (0 disables it). |
| Lots | 0.10 | 0.01 | 1.0 | Fixed order volume in lots. |

Recommended Chart Settings
Cadence Shift Runner operates on the primary chart timeframe only — it reads no higher or lower timeframes. Because it depends on clean momentum bursts and measurable volatility, it tends to be studied on intraday timeframes such as M15, M30, or H1 on liquid instruments like major forex pairs (for example EUR/USD or GBP/USD). These conditions typically provide enough directional movement for the impulse filter to register while keeping spreads manageable.
That said, the behavior of any price-action system changes substantially with the symbol, session, and volatility regime. The same parameter set that suits one pair may behave very differently on another. Always test on the specific symbol and timeframe you intend to study, and remember that results will vary across different market conditions.
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
Cadence Shift Runner has several genuine strengths as an educational example. Because it uses no indicators, it avoids indicator lag and is fully transparent — every rule can be traced directly to candle data. Its structure-based stops and reward-to-risk targets reflect disciplined risk practice, and the optional breakeven feature shows one way to manage an open position objectively. The strict filters (body dominance, impulse size, shallow pullback) are designed to be selective rather than trade-everything.
There are also clear limitations to understand. Momentum-continuation logic, by definition, performs best in trending or expanding markets. In choppy, range-bound, or low-volatility conditions, qualifying impulses are rare, and the breakouts that do trigger may quickly reverse — a classic "false breakout." Strict filters reduce the number of trades, which means fewer signals and longer waits between setups. The fixed lot size does not scale risk to account equity or to the varying stop distances produced by different setups. And like all breakout systems, it can be sensitive to spread and slippage, since entries occur as price pushes through a level.
None of these points make the strategy "good" or "bad" — they are simply the trade-offs inherent to this style. The goal is to understand when the logic is in its element and when it is fighting the market.
Risk Management Tips
Sound risk management matters more than any single strategy. As general educational principles:
- Risk a small, fixed fraction per trade. Many educators suggest risking no more than 1–2% of account equity on any single position, and sizing your lots so the stop-loss distance respects that limit rather than using a fixed lot blindly.
- Always use a demo account first. Test the strategy on a demo or simulated account until you fully understand its behavior across different sessions and conditions before considering real capital.
- Understand drawdown. Every strategy experiences losing streaks. Know the largest peak-to-trough decline you would tolerate, and study how the strategy behaves during its worst stretches, not just its best.
- Account for costs. Spread, commission, and slippage all affect breakout entries; factor them into any evaluation.
- Never risk money you cannot afford to lose, and treat any single EA as one component of a broader, well-considered approach.
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: CadenceShiftRunner.ex5 (2 downloads)
- Source Code: CadenceShiftRunner.mq5 (3 downloads)
- Documentation: CadenceShiftRunner.pdf (2 downloads)