Skip to content
All library documents

Detecting Six Harmonic Patterns with ZigZag Pivots and Fibonacci Ratios

Article ProRealCode

Summary

This indicator identifies Bat, Gartley, Crab, Butterfly, AB=CD, and Three Drives formations by evaluating the last five confirmed ZigZag pivots as an XABCD sequence. It calculates retracement and extension ratios between the swings, then compares them with pattern-specific Fibonacci ranges. A configurable tolerance broadens or tightens those ranges; the D pivot determines whether the pattern is labeled bullish or bearish. The chart displays the pattern segments and labels, with optional projected target lines.

The document explains pivot depth, minimum retracement, and spacing parameters, and notes that the detector corrects a Bat classification issue in the earlier source. It also describes the indicator as structural pattern detection rather than an automatic signal system: possible workflows include waiting for reversal confirmation and placing invalidation beyond X. No market tests or predictive results are reported. Pivot confirmation is delayed by the depth setting, tolerance can admit loose matches, and the Three Drives implementation uses the same five-pivot window despite acknowledging that a stricter method would differ.

Key ideas

  • The detector classifies six harmonic formations from five alternating ZigZag pivots.
  • It uses Fibonacci ratio ranges, with a configurable tolerance that changes how many patterns qualify.
  • The D pivot sets bullish or bearish direction, and the indicator draws the pattern on the chart.
  • Optional targets are projected from D, while the document suggests confirmation and structural invalidation as possible workflow elements.
  • The indicator supplies no tested performance evidence, and its pivot confirmation is delayed by the selected depth.

Tags

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