Blog / Strategy
Strategy

Twin Close Sandwich Reversal

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 Twin Close Sandwich Reversal is a pure price-action reversal strategy built on the classic Stick Sandwich candlestick pattern, and it is designed for traders who want to study reversals without relying on lagging indicators. Rather than reading a moving average, an oscillator, or a momentum line, this strategy reads the raw relationship between three consecutive candles. The "twin close" refers to the pattern's defining feature: two same-colour candles that close at virtually the same price, with an opposite-colour candle wedged between them like the filling in a sandwich.

That shared closing level is the heart of the idea. In technical analysis, a price level that the market visits twice and refuses to break through is treated as a form of support (a floor) or resistance (a ceiling). When two candles close at the same spot at the bottom of a decline, the strategy interprets it as a twice-defended floor — a shelf the sellers could not push below. When two candles close at the same spot at the top of a rally, it reads as a twice-tested ceiling. The middle candle, which moves sharply in the opposite direction before price snaps back to the shelf, adds context that the level was genuinely challenged and held.

This EA is best suited as a learning tool for traders who want to understand structural, price-derived reversals: how candlestick patterns are formalised into rules, how swing highs and lows define risk, and how stops and targets can be anchored to market structure instead of arbitrary pip counts. It is a mean-reversion / counter-trend concept, so it naturally appeals to those studying how markets turn rather than how they trend. It is not a "set and forget" money machine — it is a transparent, rules-based framework for examining a well-known pattern.

How It Works

The strategy evaluates only closed candles and acts once per newly formed bar. It inspects the three most recently closed bars — labelled A (oldest), B (middle), and C (newest) — and measures everything against the recent average bar range (the average High-minus-Low over a configurable period). Using average range keeps every threshold adaptive: the same rules behave sensibly whether volatility is high or low.

The strategy signals a long (bullish sandwich) when:

The strategy signals a short (bearish sandwich) using the exact mirror logic: two bullish "bread" candles closing at the same level, a bearish filling candle that drops meaningfully below the shelf, matched closes within tolerance, and the trio's high registering as a fresh swing high.

Entry, stop-loss, and take-profit logic:

Because no indicators are used, every threshold — tolerance, middle-bar excursion, and stop buffer — scales off the same recent average range, keeping the logic self-contained and price-driven.

stick sandwich reversal MT5 EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
LookbackBars 20 5 60 Number of prior bars checked to confirm the sandwich's low/high is a fresh swing extreme. Larger values demand a more significant swing point.
CloseTolerancePct 12.0 2.0 40.0 How closely the two matched closes must align, as a percentage of average bar range. Lower values require a tighter "twin close."
MinMiddlePct 45.0 10.0 150.0 Minimum distance the middle (opposite-colour) candle must travel off the shelf, as a percentage of average range. Filters out shallow, unconvincing fillings.
StopBufferPct 25.0 0.0 100.0 Extra cushion added beyond the trio's outer extreme when placing the stop-loss, as a percentage of average range.
RewardRisk 2.0 0.5 5.0 Reward-to-risk multiple. Sets the take-profit distance as a multiple of the measured stop distance.
RangePeriod 14 5 30 Number of bars used to compute the average bar range that scales all thresholds.
Lots 0.10 0.01 1.0 Fixed trade volume in lots per position.
stick sandwich reversal MT5 EA — MQL5 source code

Recommended Chart Settings

This strategy was designed around candlestick structure, so it works best on timeframes where each candle carries meaningful information — commonly the H1 (1-hour) or H4 (4-hour) charts on major forex pairs such as EUR/USD or GBP/USD, where spreads are tight and price action is relatively clean. Higher timeframes tend to produce fewer but more structurally significant sandwich patterns, which suits a reversal concept.

You are encouraged to experiment on a demo account across several symbols and timeframes. Reversal patterns behave very differently in trending versus ranging markets, and results will vary considerably depending on the instrument, session, and prevailing volatility. There is no single "correct" setting — the defaults are a reasonable starting point for study, not a guaranteed configuration.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Strengths. The Twin Close Sandwich Reversal is refreshingly transparent. Because it uses no indicators, there is nothing to lag or repaint — every decision traces directly to closed-candle prices you can verify on the chart by eye. The stop-loss is anchored to real structure (the pattern's outer extreme), and the swing-low / swing-high filter helps ensure signals appear at meaningful turning points rather than in the middle of noise. The adaptive, range-based thresholds mean the same rules travel reasonably well between calm and volatile conditions.

Limitations. The Stick Sandwich is a comparatively rare pattern, and the extra filters here — fresh swing extreme, minimum middle-bar excursion, tight twin-close tolerance — make qualifying setups rarer still. That means long stretches with no trades, which requires patience and makes robust evaluation slow. As a counter-trend approach, it is vulnerable to strong, persistent trends: a "floor" can look perfect right up until the market slices straight through it. Candlestick reversal patterns also carry a well-documented weakness — they signal a potential turn, not a confirmed one, and many patterns fail. Finally, the fixed lot size does not scale risk to account equity, and a single position at a time means the EA will sit out other opportunities while a trade is live.

Where it may underperform. Choppy, low-volatility ranges can generate matched closes that are noise rather than genuine support/resistance, and powerful trending phases can repeatedly stop out counter-trend entries. Treat this EA as a lens for studying how a classic pattern is codified — not as a standalone edge.

Risk Management Tips

Regardless of the strategy, disciplined risk management is what keeps a trading account alive long enough to learn. Consider the following general principles:

The goal of using an EA like this is education — understanding market structure, candlestick logic, and risk — not chasing a shortcut.

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