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 Quasimodo Reversal is a pure price-action, market-structure reversal strategy built around the Quasimodo pattern (also called the "Over-and-Under" or QM pattern) — a well-known formation in supply-and-demand and smart-money trading circles. Unlike most automated systems, it uses no indicators, oscillators, moving averages, or volume. Every decision is derived directly from raw OHLC (Open, High, Low, Close) swing structure on a single chart timeframe. In trading terms, that makes it a swing-structure reversal approach: it tries to identify the precise moment a trend stalls and turns, rather than riding momentum.
The Quasimodo pattern is essentially a failed trend continuation. Price makes what looks like a fresh trend extreme — a higher high in an uptrend, for example — luring breakout traders into the move. Then, instead of continuing, the market reverses sharply and breaks structure in the opposite direction. This trap-and-reverse behaviour is what the strategy is designed to detect and trade. It is best suited to ranging-to-transitional market conditions and key turning points, rather than strong, one-directional trends.
As a learning tool, the Quasimodo Reversal is useful for traders who want to understand market structure, swing pivots, and break-of-structure (BoS) logic without the clutter of lagging indicators. It is a clear, rules-based illustration of how reversal setups can be defined mathematically. This article analyses how the strategy works; it is not a profit opportunity or a recommendation to trade.
How It Works
The strategy maps the chart into a clean, alternating zig-zag of swing highs and swing lows using fractal pivots — bars whose high (or low) strictly exceeds a set number of neighbouring bars on both sides. It then inspects the last four swings for a completed Quasimodo and "arms" a setup. Here is the logic in plain English:
- Building structure: Each fully closed bar is checked to see whether it forms a fractal swing pivot. Confirmed pivots are folded into an alternating high/low zig-zag, so the chart is reduced to its core turning points. Consecutive same-type pivots are merged, keeping the more extreme one.
- Bearish Quasimodo (sell setup): The strategy signals a potential reversal when it sees four alternating swings — a swing high (left shoulder), a swing low, a higher swing high (the "head"), and then a lower low than the previous swing low. That final lower low is a break of structure to the downside, indicating buyers have lost control even though a new high was just printed. The left-shoulder high becomes the QM line.
- Bullish Quasimodo (buy setup): The mirror image. A swing low (left shoulder), a swing high, a lower low (the "head"), and then a higher high than the previous swing high — a break of structure to the upside. The left-shoulder low becomes the QM line.
- Entry — retest and rejection: Once armed, the strategy waits for price to retrace back into the QM line and then reject it. For a sell, price must climb back into the line (within a tolerance band) and then close back below it. For a buy, price must drop into the line and close back above it. A configurable tolerance band allows for imperfect retests.
- Stop-loss logic: The stop sits just beyond the "head" swing — the exact level that invalidates the reversal thesis — buffered by a fraction of the structure's size. If price moves through the head, the trade idea is considered wrong.
- Take-profit logic: The target is placed at a fixed risk-to-reward multiple of the stop distance. With the default ratio of 2.0, the target is twice the risk in profit terms.
- Invalidation and expiry: If price violates the head before the retest arrives, the setup is discarded. If the retest never arrives within the configured number of bars, the setup expires. Only one position is held at a time, and each pattern is traded only once.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SwingLookback | 3 | 2 | 6 | Fractal pivot half-width: how many bars on each side a swing must exceed to count as a confirmed pivot. Higher values produce fewer, larger swings. |
| RetestTolerance | 0.20 | 0.05 | 0.60 | Size of the "tag" band around the QM line, expressed as a fraction of the shoulder-to-head span. Larger values accept looser retests. |
| StopBufferPercent | 0.10 | 0.00 | 0.50 | Extra distance placed beyond the head for the stop-loss, as a fraction of the structure span. Acts as breathing room against a marginal violation. |
| RiskRewardRatio | 2.0 | 1.0 | 4.0 | Take-profit distance as a multiple of the stop distance. A value of 2.0 targets twice the risk. |
| ExpiryBars | 20 | 5 | 60 | Number of bars an armed setup remains valid. If no qualifying retest occurs, the setup is discarded. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed trade volume in lots for each position. |
The MT5 version also exposes a Magic number (default 4077), used to tag and identify the strategy's own positions so it does not interfere with other trades on the account.

Recommended Chart Settings
The Quasimodo Reversal operates on the primary chart timeframe only — it does not combine multiple timeframes. Because it relies on clean, well-defined swing structure, it tends to work best on liquid instruments where swings are orderly, such as major forex pairs (for example EUR/USD or GBP/USD) and on intermediate timeframes such as H1 or H4, where structure is meaningful and signals are not excessively noisy.
That said, no single setting is universally optimal. The pattern can appear on any symbol or timeframe, but its behaviour and reliability will vary considerably across different market conditions. You are encouraged to study how the swing structure forms on your chosen instrument before drawing conclusions, and to remember that results will vary as volatility, spread, and trend conditions change.
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 an honest assessment matters more than enthusiasm. Here is a balanced view of the Quasimodo Reversal.
Strengths. Because it uses raw price structure rather than lagging indicators, the logic is transparent and easy to reason about — every entry can be traced back to a specific swing sequence. It defines risk precisely: the stop sits at the structural level that invalidates the idea, so the trade thesis is either right or clearly wrong. The retest-and-rejection requirement also filters out many premature entries, since price must actively prove it is rejecting the QM line before a position is opened.
Known limitations. Reversal strategies, by nature, trade against the prevailing move, which means a strong, sustained trend can repeatedly invalidate setups as price marches through the head. Quasimodo patterns are also somewhat subjective in discretionary trading; reducing them to fixed fractal rules makes the logic objective but may miss valid setups that a human eye would catch — or arm setups that lack broader context. The fixed lot size does not scale risk to account equity, and a fixed risk-to-reward target may exit before a move fully matures.
Where it may underperform. Choppy, low-liquidity conditions can produce messy swings and false breaks of structure, while powerful trends can overrun the reversal repeatedly. The strategy historically performs best when the market is genuinely transitioning, and may struggle when it is not. Treat it as one analytical lens, not a complete trading system.
Risk Management Tips
Sound risk management is what separates durable learning from costly mistakes. Consider these general principles:
- Risk a small, fixed percentage per trade. Many educators suggest limiting risk to 1–2% of account equity on any single position, so that a string of losses does not jeopardise your capital.
- Size positions deliberately. The fixed
Lotsinput does not adjust to your balance — calculate a lot size that keeps your per-trade risk within your chosen percentage given the stop distance. - Test on a demo account first. Run the strategy in a risk-free demo environment until you fully understand how it behaves across different conditions before considering any live use.
- Understand drawdown. Even a well-designed approach experiences losing streaks. Know the maximum drawdown you are willing to tolerate, and how it would feel in real time.
- Account for costs. Spread, commission, and slippage all affect real outcomes and are easy to underestimate when reviewing a strategy in theory.
- Keep expectations realistic. No pattern wins every time; the goal of studying a system like this is understanding, not certainty.
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: QuasimodoReversal.ex5 (4 downloads)
- Source Code: QuasimodoReversal.mq5 (4 downloads)
- Documentation: QuasimodoReversal.pdf (3 downloads)