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 Left Shoulder Entry is a price-action reversal strategy built around the Quasimodo pattern (also known as the "Over-and-Under" or QM pattern) — a failed-continuation structure that signals a possible trend flip. Rather than relying on a moving average or an oscillator, it reads the raw swing structure of the market using 2-bar fractal swings, and it uses the Average True Range (ATR) — a volatility measure — only to size its stop-loss buffer. It is a single-timeframe strategy: every calculation is performed on the chart's primary timeframe, with no higher-timeframe confirmation.
The Quasimodo pattern belongs to the family of "smart money" or supply-and-demand concepts. In plain terms, it looks for a market that appears to be continuing its trend, makes one final push to a new extreme (the "head"), and then breaks structure in the opposite direction. That break of structure hints that the previous trend may be exhausting. The strategy then waits patiently for price to retrace back to a specific reference level — the "left shoulder" — before committing to a trade in the new direction.
This EA is best suited to traders who want to study how algorithmic pattern recognition translates a discretionary chart concept into hard, testable rules. Because the pattern is designed for reversals, it is aimed at ranging-to-transitioning market conditions rather than strong, uninterrupted trends. Treat it as a learning tool for understanding swing detection, break-of-structure logic, and volatility-based risk placement — not as a shortcut to any particular outcome.
How It Works
The strategy processes one closed bar at a time and builds a running history of alternating swing highs and lows. Here is what happens under the hood, in plain English:
- Swing detection: On each newly closed bar, the strategy checks the bar three positions back to see if it is a confirmed 2-bar fractal pivot — a swing high that is higher than the two bars on either side, or a swing low that is lower than the two bars on either side. Bars that qualify as both or neither are ignored.
- Building the pivot chain: Confirmed pivots are stored as a strictly alternating sequence of highs and lows. If two same-type pivots occur in a row, they are collapsed into the more extreme one, so the history always reads high, low, high, low.
- Reading the pattern: The strategy inspects the last four alternating pivots to identify a Quasimodo structure:
- Bearish QM (top): High (H1) → Low (L1) → a higher High (H2, the "head") → a lower Low (L2, the break of structure). This arms a short at the left-shoulder price H1.
- Bullish QM (bottom): the mirror image — Low → High → lower Low (head) → higher High (break of structure). This arms a long at the left-shoulder low.
- Arming, not entering: When a valid pattern forms, the strategy does not trade immediately. It "arms" a level at the left shoulder and simply waits.
- Entry trigger: For a short, price must retrace up to the armed level and then a bar must close back below it (the reverse for a long — retrace down and close back above). This close-through confirmation is what turns an armed level into a live order. Entry uses the current ask price for longs and bid price for shorts.
- Stop-loss logic: The stop is placed just beyond the "head" — above H2 for shorts, below the head for longs — plus a buffer equal to
SlBufferAtr × ATR. Using ATR means the buffer automatically widens in volatile conditions and tightens in quiet ones. - Take-profit logic: The target is set at the broken-structure pivot — the lower low (L2) for a short, the higher high for a long.
- Expiry: If an armed level is never retraced, it expires after
MaxAgeBarsbars and is discarded, so stale setups do not linger indefinitely. - One position at a time: The strategy will not open a new trade while an existing position with its magic number is already open, and it validates that the stop and target sit on the correct sides of the entry price before sending any order.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| MaxAgeBars | 30 | 5 | 100 | How many bars an armed left-shoulder level stays valid before it expires if price never retraces to it. |
| AtrPeriod | 14 | 7 | 30 | The look-back period for the ATR volatility measure used to size the stop-loss buffer. |
| SlBufferAtr | 0.5 | 0.0 | 2.0 | The stop-loss buffer expressed as a multiple of ATR, added beyond the pattern's "head" for extra breathing room. |
| Lots | 0.10 | 0.01 | 1.0 | The fixed order volume (position size) used for each trade. |

Recommended Chart Settings
This strategy was designed as a single-timeframe system, so it is applied to whatever symbol and timeframe you attach it to without any higher-timeframe filter. Swing-based reversal logic like the Quasimodo pattern is commonly studied on the H1 (1-hour) and H4 (4-hour) timeframes of major forex pairs such as EUR/USD or GBP/USD, where swing structure tends to be cleaner and less noisy than on very low timeframes.
Lower timeframes generate more pivots and therefore more signals, but also more false patterns; higher timeframes produce fewer, slower setups. There is no universally "correct" combination — results will vary considerably across different symbols, timeframes, and market conditions. Always test any configuration on historical data and a demo account before drawing conclusions.
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
The strengths of this approach lie in its structure. It is fully rule-based, so it removes the subjectivity that plagues discretionary Quasimodo trading — the swing detection, pattern validation, and entry trigger are all defined in code. Its use of a close-through confirmation (rather than a naked touch of the level) is a sensible filter that historically helps avoid entering on a level that price merely wicks through. Anchoring the stop beyond the pattern's head with an ATR-scaled buffer is also a logical, volatility-aware way to place risk.
The known limitations are equally important to understand. Reversal patterns like the Quasimodo are, by definition, trying to catch a turn against the prevailing move — and in a strong, persistent trend, a reversal signal can fail repeatedly as price simply continues. The 2-bar fractal is a fast, sensitive swing definition; on noisy or choppy charts it may register many minor pivots and produce patterns that do not correspond to meaningful structure. Because the strategy trades a single timeframe with no trend filter, it cannot distinguish a high-quality reversal zone from a low-quality one beyond the pattern geometry itself.
You should also note that the take-profit is fixed at the broken-structure pivot and the stop at the head, which gives each setup a defined but variable risk-to-reward ratio — some setups will offer a favorable ratio, others a poor one, depending on how far apart those pivots sit. There is no trailing stop, breakeven move, or partial-exit logic. This is a clean teaching implementation, not an exhaustively optimized system, and it may underperform in trending markets, during major news volatility, or on instruments with wide spreads.
Risk Management Tips
Sound risk management matters far more than any single entry pattern. Keep these general principles in mind as you study this strategy:
- Risk a small, fixed fraction per trade. Many educators suggest never risking more than 1–2% of account equity on any one position. The fixed
Lotsparameter here does not scale to your account size, so you must set it deliberately relative to your stop distance and balance. - Understand your drawdown tolerance. A string of losing trades is normal for any reversal strategy. Know in advance how much peak-to-trough decline you are willing to accept before you would pause and reassess.
- Always start on a demo account. Run the EA in a risk-free simulated environment first so you understand its behavior, frequency of trades, and how it reacts to different conditions before considering any live capital.
- Test across conditions. Backtest and forward-test over trending, ranging, and volatile periods — a strategy that looks appealing in one regime can behave very differently in another.
- Never over-leverage. Leverage magnifies both gains and losses. Use it conservatively and size positions so that a normal losing streak cannot threaten your account.
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: QuasimodoLeftShoulderEntry.ex5 (1 downloads)
- Source Code: QuasimodoLeftShoulderEntry.mq5 (1 downloads)
- Documentation: QuasimodoLeftShoulderEntry.pdf (1 downloads)