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 Pattern Swing Reversal is a price-action reversal strategy built around the Quasimodo pattern (also known as the "QM" or "over-and-under" pattern) combined with an Average True Range (ATR) volatility filter for its stop-loss and take-profit placement. Rather than relying on a lagging moving average or oscillator, this approach reads raw market structure — the sequence of swing highs and swing lows — to locate points where a trend may be exhausting and preparing to turn.
The Quasimodo pattern is a favorite among traders who study market structure and supply and demand. In a bearish setup, price prints a left-shoulder high, pushes to a higher "head" high, and then breaks the low between those two peaks — an event known as a break of structure (BOS). The strategy's edge, in theory, is the retrace back up to the unmitigated left-shoulder high, which is treated as a fresh supply level where a short reversal can be considered. A bullish Quasimodo simply mirrors this logic at a lower head-low, with a long taken on the retrace down to the left-shoulder low.
This strategy is best understood as a learning tool for traders who want to study how structure-based reversals can be codified into rules. It suits intermediate students of technical analysis who already grasp swings, fractals, and volatility-based risk. It is not a set-and-forget system, and it is not designed to chase every move — it waits patiently for a very specific pattern to complete before it acts.
How It Works
The strategy scans a rolling window of recently closed bars once per newly formed bar. It uses 5-bar fractals (a swing point confirmed by two higher/lower bars on each side) to identify the two most recent swing highs and swing lows. Here is what the strategy signals, step by step:
- Swing detection: Using fractals, the strategy locates the two most recent swing highs (the older one is the "shoulder," the newer, higher one is the "head") and the two most recent swing lows for the mirrored bullish case.
- Bearish structure check: For a short, the head high must be higher than the shoulder high, confirming the over-and-under shape.
- Break of structure (BOS): The strategy records the lowest low between the shoulder and the head, then confirms that price has since closed below that mid-low after the head formed. This break of structure suggests the prior up-move has been rejected.
- The tag (entry trigger): The strategy waits for price to retrace back up and "tag" the left-shoulder high. Specifically, the current bar's high must reach within a small tolerance (a fraction of ATR) of the shoulder high, while its close remains below that level — indicating the supply zone may be holding.
- Short entry: When both the BOS and the tag conditions are met and there is no open position, the strategy signals a short entry at the current bid.
- Bullish mirror: The bullish Quasimodo reverses all of the above — a lower head-low, a BOS above the mid-high, and a tag of the left-shoulder low with a close above it — signaling a long entry at the current ask.
Stop-loss logic: For a short, the stop is placed a configurable ATR multiple above the head high (the pattern's invalidation point). For a long, it sits an ATR multiple below the head low. Using ATR means the stop distance automatically widens in volatile conditions and tightens in quiet ones.
Take-profit logic: The target is a fixed ATR multiple away from entry (default 2.5× ATR), giving the strategy a structured, volatility-adjusted reward objective rather than a fixed pip goal.
The strategy also enforces a one-position-at-a-time rule per symbol and magic number, so it will not stack multiple trades on the same pattern.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| SwingScan | 50 | 20 | 150 | Number of bars back to scan when searching for swing highs and lows. Larger values look further into history for the pattern. |
| TagAtrFrac | 0.2 | 0.0 | 1.0 | Tolerance for tagging the shoulder level, expressed as a fraction of ATR. Higher values allow a looser "touch" of the supply/demand level. |
| AtrPeriod | 14 | 7 | 30 | Look-back period for the Average True Range calculation used in stop and target sizing. |
| AtrSlMult | 0.5 | 0.1 | 2.0 | ATR multiple that sets how far the stop-loss sits beyond the head high (short) or head low (long). |
| AtrTpMult | 2.5 | 1.0 | 6.0 | ATR multiple that sets the take-profit distance from the entry price. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed order volume (position size) in lots for each trade. |

Recommended Chart Settings
This strategy operates on a single timeframe — every calculation uses the chart's primary timeframe, so there is no multi-timeframe dependency to configure. Quasimodo patterns are commonly studied on intraday charts such as the H1 (1-hour) or H4 (4-hour) timeframes, where swing structure is clear and there is enough movement for the ATR-based targets to make sense. Major forex pairs like EUR/USD or GBP/USD are typical study candidates because of their liquidity and relatively clean structure.
That said, the ideal symbol and timeframe depend heavily on the instrument's volatility and behavior. Results will vary considerably across different market conditions, sessions, and instruments, so treat any chart setting as a starting point for your own testing rather than a fixed recommendation.
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
Strengths of this approach. The Quasimodo pattern is a well-defined, rules-based reflection of market structure, which makes it appealing for study: entries are only taken when a specific sequence — shoulder, head, break of structure, and retrace — has completed. Because the stop is anchored to the head (the pattern's natural invalidation point) and both stop and target scale with ATR, the risk logic adapts to changing volatility rather than using arbitrary fixed distances. The one-trade-at-a-time rule also keeps exposure disciplined.
Known limitations. Reversal patterns, by definition, try to trade against the immediately preceding move, which is inherently harder than trend-following. In a strong, persistent trend, the "tag" of the shoulder level may fail repeatedly as price simply pushes through supply or demand — a phenomenon often called being on the wrong side of momentum. Fractal-based swing detection is also lagging: a swing point is only confirmed two bars after it forms, so the pattern is always recognized with a small delay. During choppy, low-volatility ranges, the strategy may either produce few signals or get whipsawed as false breaks of structure appear.
Market conditions where it may underperform. Consolidating, news-driven, or erratic markets can generate breaks of structure that quickly reverse, and gappy conditions may cause slippage around the ATR-based stops. As with any single-pattern system, no combination of parameters will suit every symbol or regime, and periods of extended drawdown are a normal part of reversal trading. Study its behavior carefully before drawing conclusions.
Risk Management Tips
Sound risk management matters far more than any single entry pattern. Consider these general principles as you study this strategy:
- Risk a small, fixed fraction per trade. Many educators suggest risking no more than 1–2% of account equity on any single position, so that a string of losses does not threaten your capital.
- Size positions from your stop, not your hopes. Because this strategy places its stop at an ATR distance beyond the head, use that distance to calculate a lot size consistent with your chosen risk percentage rather than relying blindly on the default
Lotsvalue. - Test on a demo account first. Run the EA on a demo or a small-scale environment across varied market conditions before considering any live use, so you understand how it behaves in trends, ranges, and volatile sessions.
- Understand drawdown. Every strategy experiences losing streaks. Know the maximum drawdown you are emotionally and financially prepared to tolerate, and stop to reassess if that threshold is approached.
- Never over-leverage. Leverage amplifies both gains and losses. Keep effective leverage modest, especially while you are still learning how the pattern performs.
Treat this EA as a way to study how market-structure reversals can be automated — not as a shortcut. The goal is to learn how each condition behaves and how risk parameters interact, so you become a more informed and disciplined trader.
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: QuasimodoPatternSwingReversal.ex5 (0 downloads)
- Source Code: QuasimodoPatternSwingReversal.mq5 (0 downloads)
- Documentation: QuasimodoPatternSwingReversal.pdf (1 downloads)