Skip to content
All library documents

Detecting Bullish and Bearish Gartley Patterns with Fibonacci Ratios

Article ProRealCode

Summary

This document describes a ProRealTime indicator for finding bullish and bearish Gartley, or 222, harmonic patterns. It first identifies local highs and lows across several zigzag-style window lengths, then measures the XA, AB, BC, and CD legs of candidate swings against Fibonacci proportions. The main checks include an AB retracement near 0.618 of XA, alternative BC and CD ratios, and a D point near 0.786 of XA. Detected structures are drawn as two colored triangles on the chart.

The tolerance setting controls how closely the measured legs must match the ratios: a wider tolerance can produce more candidates and more false positives. Multiple window lengths can yield overlapping patterns, and local turning points may change as new bars arrive, so detections can repaint. The indicator is a visual screening aid, not a trading system: it gives no entry, exit, or position-sizing rules. The document recommends checking the pattern against market context and other confirmation signals; it provides no performance study or evidence that the patterns predict profitable trades.

Key ideas

  • The indicator detects local turning points using several symmetric price windows.
  • Candidate Gartley structures are checked against Fibonacci proportions for their four price legs.
  • A tolerance setting trades stricter ratio matching against the number of detected patterns.
  • Multiple scales can create overlapping detections, and turning points can change as data arrives.
  • The triangles mark candidate structures but do not provide trade entry or exit rules.

Tags

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