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 Right Shoulder Reversal is a price-action reversal strategy built around the Quasimodo (QM) pattern — sometimes called the "over-and-under" pattern — combined with an Average True Range (ATR) filter for stop placement and risk sizing. The Quasimodo is essentially a failed head-and-shoulders: a structure that lures breakout traders in one direction and then reverses sharply against them. Rather than chasing the breakout, this strategy waits for the pattern to complete and enters on the "right-shoulder" retest, where price returns to a specific reference line before turning.
The approach is designed for swing-based, reversal-style trading on liquid instruments in trending-to-ranging transitions. It reads market structure from confirmed swing highs and lows — not from a lagging moving average — so it aims to identify the moment a trend loses momentum and rolls over. Because it keys off structure rather than raw indicator crossovers, it is most at home on cleaner, higher-liquidity charts where swings are well-defined.
As a learning tool, this strategy is well suited to traders who want to study market structure, swing detection, and reversal logic in a systematic, rule-based way. It demonstrates how a pattern that traps other participants can be encoded into objective conditions: confirmed fractals, a break of structure, a measured retest, and a reward-to-risk gate. This article analyzes how those pieces fit together — it is a strategy analysis, not a profit opportunity.
How It Works
The strategy continuously tracks swing highs and swing lows, assembles them into a sequence, and looks for a completed Quasimodo shape before arming a single, conditional entry. Here is the logic in plain English:
- Swing detection (non-repainting): The strategy confirms swing points using 5-bar fractals — a candle whose high (or low) is more extreme than the two bars on either side. Confirmation happens on already-closed bars, so a swing does not "repaint" or disappear after the fact.
- Building the pattern: Each confirmed swing is pushed onto a short sequence. The strategy then inspects the last four swings to see whether they form a valid QM structure.
- Bearish QM (short setup): The swings run high → low → head (a higher high) → low that breaks below the prior swing low. That break below structure is the trap for breakout buyers. The strategy arms a sell at the left-shoulder high line, with the stop reference above the head and the target at the broken low.
- Bullish QM (long setup): The mirror image — low → high → head (a lower low) → high that breaks above the prior swing high. The strategy arms a buy at the left-shoulder low line, with the stop reference below the head and the target at the broken high.
- The retest entry: Once armed, the strategy waits for price to retrace back to the left-shoulder line. The short is triggered when price trades up into that line; the long is triggered when price trades down into it. The entry fires only once and only when flat (no existing position for this strategy's magic number).
- Stop-loss logic: The stop is placed beyond the head of the pattern, padded by a buffer of
StopBufferAtr × ATR. Using ATR means the stop distance adapts to current volatility rather than being a fixed number of pips. - Take-profit logic: The target is the swing level that was broken — the broken low for shorts, the broken high for longs — representing the projected reversal move.
- Reward-to-risk gate: Before sending any order, the strategy measures reward versus risk. If the ratio is below
MinRewardRisk, the signal is skipped. This filters out setups where the stop is too wide relative to the potential move. - Expiry: An armed entry line stays live for only
ExpiryBarsbars. If the retest never comes within that window, the setup is discarded and the strategy waits for the next pattern.
In short, the strategy signals a potential reversal when a failed head-and-shoulders completes and price returns to retest the structure — it does not predict outcomes, it simply defines the conditions under which a trade may be placed.

Strategy Parameters
| Parameter | Default | Min | Max | Description |
|---|---|---|---|---|
| AtrPeriod | 14 | 7 | 30 | Lookback period for the Average True Range used to size the stop buffer. Larger values smooth volatility over more bars. |
| StopBufferAtr | 0.40 | 0.0 | 2.0 | Extra padding beyond the head, expressed in ATR multiples. Higher values give the stop more room but widen risk. |
| MinRewardRisk | 1.00 | 0.3 | 4.0 | Minimum reward-to-risk ratio required to accept a signal. Setups below this threshold are ignored. |
| ExpiryBars | 25 | 3 | 100 | Number of bars an armed entry line remains valid while waiting for the retest. |
| Lots | 0.10 | 0.01 | 1.0 | Fixed order volume (position size) per trade. |
| Magic | 6118 | 0 | 9,999,999 | Unique identifier so the EA only manages its own positions and ignores other trades on the account. |

Recommended Chart Settings
This strategy was designed as a single-timeframe system and runs on the chart's primary timeframe. The default and most-tested context is:
- Symbols: EURUSD or XAUUSD (Gold)
- Timeframes: M15 to H1
These instruments tend to produce well-defined swing structure, which the fractal-based detection relies on. The M15–H1 range balances enough bars to confirm patterns against timeframes low enough to generate a reasonable number of setups. As always, behavior will vary across different market conditions, sessions, and brokers — spreads on Gold in particular can materially affect a structure-based entry, so evaluate any instrument on 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
Every strategy has strengths and trade-offs, and an honest assessment matters more than optimism.
Strengths of this approach:
- Structure-based, non-repainting logic. Because swings are confirmed on closed bars, signals do not shift after they appear — a common weakness in many pattern indicators.
- Defined risk on every trade. The stop sits beyond the pattern's head and the target is a concrete structural level, so each setup carries a pre-measured reward-to-risk profile.
- Volatility-aware stops. Tying the stop buffer to ATR helps the strategy adapt to calmer and more active market phases without manual re-tuning.
- Selective by design. The reward-to-risk gate and one-shot entry mean the strategy sits out many bars, historically favoring quality of setup over frequency.
Known limitations:
- Reversal strategies fight the prevailing move. Quasimodo setups attempt to catch turning points. In a strong, persistent trend, the "head" can be exceeded and the pattern can fail, so this style may underperform in relentless directional markets.
- Fewer signals. Requiring a full four-swing structure plus a timely retest means setups are relatively rare. Long quiet stretches are normal and expected.
- Sensitivity to swing definition. The 5-bar fractal is a fixed lens on structure. On very noisy or very low-timeframe charts, it may confirm swings that a discretionary trader would ignore.
- Retest may never arrive. If price runs straight to target without retracing to the entry line within
ExpiryBars, the setup simply expires with no trade — the potential move is missed by design.
The strategy is best understood as a study in structure-based reversal timing, not as a hands-off solution. Reviewing the trades it takes — and the ones it skips — is where most of the learning happens.
Risk Management Tips
Risk control is what keeps a learning process sustainable. Consider these general principles:
- Size positions to your account, not to the default. The
Lotsvalue is a placeholder. A common educational guideline is to risk no more than 1–2% of account equity on any single trade, which means calculating volume from your stop distance rather than using a fixed lot. - Test on a demo account first. Run the strategy in simulation across different sessions and market regimes before considering any live capital. This builds familiarity with how often it trades and how it behaves in drawdown.
- Understand drawdown. Reversal strategies can experience clusters of losing trades when the market trends against them. Know the maximum losing streak you are willing to tolerate before you begin.
- Respect the reward-to-risk gate. The
MinRewardRiskparameter exists to enforce discipline. Loosening it may increase trade frequency but can degrade the average quality of setups. - Keep expectations grounded. No parameter combination removes risk. Backtests describe the past under specific conditions and do not predict future results.
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: QuasimodoRightShoulderReversal.ex5 (0 downloads)
- Source Code: QuasimodoRightShoulderReversal.mq5 (0 downloads)
- Documentation: QuasimodoRightShoulderReversal.pdf (0 downloads)