Skip to content
All library documents

Algorithmically Detecting and Testing Multiple-Top Reversal Patterns

Article MQL5 articles

Summary

This article explains how to turn visual reversal formations, especially multiple tops and related bottom patterns, into explicit rules that software can evaluate bar by bar. It discusses shared pattern components such as extrema, trend and neck lines, projected targets, and stop boundaries. The proposed searcher class organizes those components and applies configurable constraints to select peaks or troughs, determine formation direction, and discard patterns that fail filters. The article also presents multiple tops as a broader pattern family that can be extended toward formations such as triple tops and head-and-shoulders patterns.

The author recommends using the MetaTrader strategy tester and its visualizer to inspect detected formations and gather statistics, arguing that backtesting is needed because pattern definitions are often subjective. The supplied discussion treats the detector as a coding and research framework, not as proof that the formations predict reversals profitably. No robust performance evidence is established in the excerpt, and the author acknowledges that patterns alone are insufficient and may need combination with other analysis. Results would depend on precise rules, instruments, timeframes, and test design.

Key ideas

  • Algorithmic pattern detection requires explicit rules for extrema, lines, direction, and validity filters.
  • A multiple-top searcher can be structured as a class that manages pattern data and detection steps.
  • The multiple-top concept can be generalized to related formations such as triple tops and head and shoulders.
  • Bar-by-bar processing can reduce repeated work compared with evaluating every tick.
  • Visual backtesting can inspect detections and collect evidence, but the article does not establish profitable predictive performance.

Tags

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