Blog / Strategy
Strategy

Stair Step Trend Continuation

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 Stair Step Trend Continuation strategy is a pure price-action, trend-following system for MetaTrader 5 that uses no technical indicators at all — it reads market structure directly from raw open-high-low-close (OHLC) bar data. Instead of relying on moving averages, oscillators, or momentum tools, it identifies trends through swing structure: the sequence of swing highs and swing lows that price prints as it moves. A swing high is a local peak, and a swing low is a local trough; together they form the "stair-step" pattern that gives the strategy its name.

The core idea is rooted in a classic observation about healthy trends. When a market is genuinely trending higher, it tends to "stair-step" upward — printing a series of higher swing highs and higher swing lows. A downtrend mirrors this, carving out lower swing highs and lower swing lows. The strategy waits for this structure to confirm, then looks for a shallow counter-trend pullback before re-entering in the direction of the established trend. It is designed for trending market conditions and is most at home on instruments and timeframes that produce clean, directional moves rather than choppy, range-bound noise.

As a learning tool, this strategy is well suited to traders who want to understand how trend continuation and market-structure analysis work without the clutter of lagging indicators. Because every decision is derived from price alone, it offers a transparent, readable example of how swing detection, pullback counting, and risk-defined entries fit together. This is a strategy analysis intended to build your understanding of price-action mechanics — not a shortcut or a promise of any particular outcome.

How It Works

The strategy evaluates the market once per newly closed bar and acts only on confirmed, completed price data. Here is how its logic flows in plain English:

In short, the strategy signals a trade only when an established stair-step trend pauses for a brief pullback and then shows a sign of resuming. Every entry carries a predefined stop and target, so the risk on each trade is known before it is placed.

stair step trend continuation EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
PivotLength 3 2 8 Symmetric pivot half-width. The number of bars required on each side of a candidate bar to confirm it as a swing high or swing low. Larger values detect bigger, slower swings.
PullbackBars 2 1 5 Minimum number of consecutive counter-trend closes that must form before a pullback is considered valid for re-entry. Higher values demand deeper pullbacks.
RewardRatio 2.0 1.0 4.0 Take-profit distance expressed as a multiple of the trade's risk (the entry-to-stop distance). A value of 2.0 sets the target at twice the risk.
StopBufferPct 0.25 0.0 1.0 Extra stop-loss buffer beyond the pullback extreme, measured as a fraction of the current bar's range. Adds breathing room past the invalidation point.
Lots 0.10 0.01 1.0 The fixed order volume (position size) used for each trade.
stair step trend continuation EA — MQL5 source code

Recommended Chart Settings

The Stair Step Trend Continuation strategy operates on a single symbol and a single timeframe — the chart it is attached to. Because it relies on clean swing structure, it tends to be most readable on instruments that produce sustained directional moves, such as major forex pairs, and on intermediate timeframes like the H1 (1-hour) or H4 (4-hour) charts, where swing pivots are meaningful and signals are less affected by short-term noise.

These are starting points for study, not prescriptions. The behavior of any structure-based strategy changes with volatility, session, and instrument. Results will vary across different market conditions, and the same parameters that suit one symbol may behave very differently on another. Always test on the specific symbol and timeframe you intend to study before drawing any conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

This strategy has clear strengths as an educational model. Because it uses no indicators, there is no lag from smoothing or averaging — every signal traces directly back to price structure you can see on the chart. Its risk is defined on every trade by the pullback extreme, which gives each setup a logical, structural invalidation point rather than an arbitrary fixed stop. The stair-step concept also encourages you to think in terms of swing analysis and trend context, which is valuable knowledge regardless of the specific tool.

There are equally important limitations to understand. Like all trend-following approaches, it depends on the market actually trending. In range-bound or choppy conditions, swing highs and lows can flip-flop, producing false trend reads and entries that quickly reverse. The symmetric pivot used to detect swings is confirmed only after PivotLength bars have closed on each side, so swing recognition is inherently delayed — by design, the strategy reacts to confirmed structure rather than anticipating it. Sudden gaps, news spikes, or low-liquidity sessions can also place price beyond the intended stop or target levels.

No single set of parameters performs consistently across all instruments and market regimes. The right PivotLength or PullbackBars for a volatile pair may be wrong for a calmer one. Treat this EA as a framework for studying trend continuation, and expect periods where it underperforms when the market is not cooperating with its core assumption.

Risk Management Tips

Sound risk management matters far more than any single entry rule. Consider these general principles as you study this or any strategy:

Education and preparation are the foundation of responsible trading. The goal of studying a strategy like this one is to deepen your understanding of market structure and risk-defined entries — not to chase a particular result.

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

← Back to Blog