Skip to content
All library documents

Rule-Based Double Top and Double Bottom Reversal Trading

Article MQL5 articles

Summary

This article turns double top and double bottom chart patterns into a deterministic trading system. It identifies confirmed swing pivots, pairs peaks or troughs using a tolerance scaled to pattern height, and defines the neckline using the intervening pivot. Minimum spacing, leg balance, and an optional prior-trend check screen candidate patterns.

A setup is triggered by a bar close through the neckline, with an optional entry after a pullback retest. Stops sit beyond the paired extreme with a buffer; targets use either a measured move or a reward-to-risk multiple. The system also includes configurable position sizing and trailing stops. It is presented as an MQL5 implementation intended for repeatable testing, but the excerpt provides no backtest results to establish profitability. The author recommends testing across instruments and timeframes and cautions that the model does not remove trading risk.

Key ideas

  • Confirmed swing pivots and a height-scaled tolerance make peak matching rule-based.
  • The intervening pivot defines the neckline, and the pattern is confirmed by a close beyond it.
  • Spacing, leg balance, and an optional prior-trend filter reject some candidate formations.
  • Entries can occur on the neckline break or after a retest, with stops beyond the pattern extreme.
  • Measured-move and reward-to-risk targets, position sizing, and trailing stops are configurable.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.