Skip to content
All library documents

Automated Detection and Configuration of Harmonic Chart Patterns

Article MQL5 code base

Summary

The document describes an indicator that scans price swings for harmonic chart patterns. These formations use five extrema connected by proportionality and range constraints; the software automates measurement that may be difficult to do consistently by eye. It lists fourteen pattern types, including Gartley, Bat, Butterfly, Crab, AB=CD, and Three Drives, and says each type can be switched on or off.

Users can adjust display colors, the number of shared points allowed between patterns, maximum pattern length, and the historical scan depth. A swing-extraction method identifies tops and bottoms, so the minimum swing size must be set. Constraint slack allows imperfect ratio matches, while projected patterns can identify formations still developing; users can tune projection precision and distance or disable that feature to reduce CPU use. The description explains configuration and detection behavior but supplies no performance tests, trading rules, or evidence that detected formations predict returns. Results therefore depend on parameter choices and the quality of the underlying swing detection.

Key ideas

  • Harmonic patterns are defined by proportional relationships among five price extrema.
  • The indicator automatically detects completed and developing formations.
  • Pattern types, display options, history depth, and pattern length are configurable.
  • Swing-size and constraint-slack settings affect which formations qualify.
  • The document offers no evidence that detections produce profitable trades.

Tags

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