Discussing the article: "Automating Trading Strategies in MQL5 (Part 49): The Quasimodo (QM) Reversal Pattern"
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Automating Trading Strategies in MQL5 (Part 49): The Quasimodo (QM) Reversal Pattern.
In this article, we build an automated trading program in MQL5 that detects the Quasimodo reversal pattern from a zig-zag of confirmed swing pivots. We work through swing detection, pattern arming, retrace entries at the QM line, and structural stop placement with risk-based sizing. We also add trade management with breakeven, trailing, and partial closing to handle open positions.
The Quasimodo pattern, sometimes called the "over-and-under" pattern, is a reversal structure built from a recognizable sequence of swing points. It belongs to the same family as the head-and-shoulders formation, but it reframes the structure around a liquidity sweep and a confirmed break of market structure rather than a symmetrical neckline. Picture an uptrend topping out. Price prints a swing high (Left Shoulder), pulls back to a swing low (Leg), then pushes to a higher high (Head) that sweeps liquidity above the shoulder. Instead of continuing, price rolls over and drives down through the leg low, and that move is the break of structure signaling the prior uptrend has likely ended. The mirror image applies to a downtrend reversing upward: a Left Shoulder low, a Leg high, a lower Head, and a break of structure above the Leg. Have a look below at a general structure of the pattern.
Once the structure is confirmed, the pattern hands us three precise levels without guesswork. The entry sits at the left shoulder price, which becomes the QM line, on the expectation that price retraces back to that level before the reversal extends; the invalidation sits just beyond the head, since a close back through the head means the sweep was not the end of the trend; and the target is the structural level that price broke, giving a measured objective tied to real market structure. Reliable detection requires consistent swing reading. We confirm a pivot only after a fixed number of bars close on both sides, then connect confirmed pivots into an alternating zig-zag of highs and lows. When two highs or two lows appear in a row, we keep only the more extreme one, so the last four pivots always read cleanly as a candidate shape, and a prior-trend filter can verify the swings leading into the shoulder were genuinely trending before we accept the reversal.
Author: Allan Munene Mutiiria