# Gartley

Also known as: 222 pattern.
A Elliott & Harmonics concept (Harmonic patterns) in the LuxAlgo Library, with 1 indicator implementation.

## What is a Gartley?

The Gartley is a five-point XABCD retracement pattern first sketched by H.M. Gartley in his 1935 book Profits in the Stock Market, on page 222, which is why it is also called the 222 pattern. Price makes an impulsive XA leg, pulls back to B, bounces to C, and completes at D inside the span of XA. The Fibonacci ratios that now define it were added by later authors: in the common modern reading, B retraces 0.618 of XA, C retraces 0.382 to 0.886 of AB, and D completes at the 0.786 retracement of XA, ideally where an internal [AB=CD](https://www.luxalgo.com/library/concept/abcd/) finishes as well.

Gartley himself was a Wall Street analyst and educator, and his original diagram was a trend-continuation pullback without Fibonacci arithmetic. The ratio-defined version emerged decades later as [harmonic patterns](https://www.luxalgo.com/library/concept/harmonic-patterns/) became a distinct discipline: Larry Pesavento attached Fibonacci ratios to the structure, and Scott Carney's late-1990s work fixed the 0.618 B and 0.786 D most detectors now implement, drawn from the broader [harmonic ratio set](https://www.luxalgo.com/library/concept/harmonic-and-fib-ratio-set/).

Traders treat the D completion as a [potential reversal zone](https://www.luxalgo.com/library/concept/potential-reversal-zone/): a confluence of ratio projections where the pullback against XA is expected to end and the original direction to resume. It is a place to evaluate a reversal with defined risk, not a promise of one; price that trades decisively beyond X invalidates the pattern, and completions fail regularly when the move against XA is strong.

In Elliott terms, XA reads as part of a [motive wave](https://www.luxalgo.com/library/concept/motive-wave/) and the A-to-D structure as a [corrective wave](https://www.luxalgo.com/library/concept/corrective-wave/), the ratio checks mirroring familiar [Fib wave relationships](https://www.luxalgo.com/library/concept/fib-wave-relationships/). Beyond any hit rate, the pattern forces a trader to define the impulse, the correction, the invalidation point, and the entry zone before the trade exists, which makes it a risk framework as much as a pattern.

## How to identify a Gartley pattern on a chart

A Gartley is measured, not eyeballed: work from swing pivots, ideally the ones a ZigZag would mark, and check each leg against its ratio.

1. Find a strong directional XA leg, an [impulse](https://www.luxalgo.com/library/concept/impulse/) off a meaningful swing point, and mark X at its origin and A at its extreme.
2. Mark B where the first pullback ends and measure its retracement of XA; near 0.618 keeps the Gartley count alive, while much shallower or deeper readings point to other patterns.
3. Mark C where the bounce from B stalls; it should retrace between 0.382 and 0.886 of AB and stay inside A.
4. Project D in advance: the 0.786 retracement of XA and the AB=CD completion should land in overlapping territory; that overlap is the zone worth watching.
5. Check invalidation before entry: D must complete inside the XA span, and a decisive close beyond X voids the pattern regardless of how good the ratios looked.

## How it's calculated

The Gartley is a four-leg XABCD retracement pattern whose D point completes near the 0.786 retracement of the initial XA leg.

```
1. Identify the impulse leg XA (bullish case: X a swing low, A a swing high).
2. Check point B: abs(A - B) / abs(A - X) = 0.618, within tolerance.
3. Check point C: abs(B - C) / abs(A - B) between 0.382 and 0.886.
4. Project point D from BC: abs(C - D) / abs(B - C) between 1.13 and 1.618.
5. Check point D against XA: abs(A - D) / abs(A - X) = 0.786, within tolerance.
6. The BC projection and the 0.786 XA retracement converge to form the PRZ at D; the pattern anticipates a reversal from D back in the direction of XA.
7. The bearish Gartley is the exact mirror: X a swing high, A a swing low, D completing as a swing high.

  X, A, B, C, D: consecutive alternating swing points (bullish: X low, A high, B low, C high, D low)
  XA, AB, BC, CD: pattern legs, measured as absolute price ranges, e.g. XA = abs(A - X)
  0.618, 0.786: XA retracement ratios defining B and D (0.786 = sqrt(0.618))
  0.382 to 0.886: allowed BC retracement band of AB
  1.13 to 1.618: allowed CD extension band of BC
  PRZ: potential reversal zone, the price band where the D-point targets converge
```

Named for H.M. Gartley, whose Profits in the Stock Market (1935) shows the pattern on page 222, hence the alias 222 pattern; the ratio table above is the modern Pesavento and Carney formalization.

Carney's strict version pins B at exactly 0.618; screeners typically allow a tolerance of a few percent on each ratio.

Stops beyond X and targets at retracements of AD are common usage conventions, not part of the pattern definition.

## How traders use it

- As a pullback entry template: after an impulsive XA leg, traders project the 0.786 XA level and the AB=CD completion, wait for price to reach the zone at D, and look for confirmation such as a rejection candle or momentum shift before entering in the XA direction.
- For predefined risk: because D is projected in advance, stops commonly sit beyond the X point, where the pattern is objectively wrong, with initial targets at retracements of the AD swing, often the 0.382 and 0.618 levels.
- As a trend-following filter: many treatments only take Gartleys whose XA leg points with the higher-timeframe trend, using the pattern to time pullbacks rather than to call tops or bottoms.
- As a scan target: detectors such as LuxAlgo's Harmonic Pattern Detection test ZigZag pivots against ratio tolerances, standardizing the geometry but leaving results sensitive to pivot depth and tolerance settings.
- As confluence with a wave count: some traders rate a Gartley completion highly only when it coincides with a plausible correction ending under [Elliott Wave Theory](https://www.luxalgo.com/library/concept/elliott-wave-theory/) or a higher-timeframe level, stacking independent reasons at D.

## Gartley vs neighboring harmonic patterns

- **Bat** (https://www.luxalgo.com/library/concept/bat/): Same XABCD retracement shape, different ratios: the Bat pairs a shallow B (0.50 of XA or less) with a deeper 0.886 D, while the Gartley pairs a 0.618 B with a 0.786 D. The B-point measurement usually decides the classification.
- **Butterfly** (https://www.luxalgo.com/library/concept/butterfly/): The Butterfly moves the 0.786 ratio to the B point and completes beyond the X extreme, typically at a 1.27 extension of XA; the Gartley completes inside the XA leg.
- **Crab** (https://www.luxalgo.com/library/concept/crab/): The Crab is the extreme case, completing far beyond X at the 1.618 extension of XA; the Gartley is its opposite pole, finishing inside the XA leg at the 0.786 retracement.
- **ABCD** (https://www.luxalgo.com/library/concept/abcd/): The ABCD is the four-point symmetry embedded inside most Gartleys. A Gartley adds the X anchor and requires D to align with the 0.786 retracement of XA, not just with CD = AB.

## FAQ

### What does the 222 in the Gartley 222 pattern mean?

It is a page reference: the pattern appeared on page 222 of H.M. Gartley's 1935 book Profits in the Stock Market. The original study had no Fibonacci ratios; the 0.618 B and 0.786 D now treated as defining were added decades later by harmonic-pattern authors, so the historical 222 and the modern ratio-defined Gartley are related but not identical.

### What ratios define a valid Gartley pattern?

In the common modern definition, B retraces about 0.618 of the XA leg, C retraces 0.382 to 0.886 of AB, and D completes near the 0.786 retracement of XA, ideally where an AB=CD structure also finishes. Tolerances vary by author and by detector, which is why two tools can mark different Gartleys on the same chart.

### Is the Gartley pattern bullish or bearish?

Either, by orientation. A bullish Gartley starts with an upward XA leg and completes with D as a higher low above X, setting up a long entry; a bearish Gartley mirrors it after a downward XA. The pattern itself is direction-neutral.

### Where does the stop loss go on a Gartley trade?

The objective invalidation is beyond X, where a decisive move breaks the definition. Some traders tighten the stop to just beyond the D pivot or the 0.886 retracement for better reward-to-risk, accepting more stop-outs from overshoots. Wherever it sits, place it where the pattern is wrong, then size the position to that distance.

### How reliable is the Gartley pattern?

No independently verified universal win rate exists; published figures vary with markets, timeframes, tolerance settings, and confirmation rules, so treat any specific percentage with suspicion. What can be said is structural: the predefined stop beyond X and targets on the AD swing are designed so losing completions cost less than winning ones pay, which is where any edge would have to come from.

### Can a Gartley appear on any timeframe?

Yes; the geometry is scale-free and detectors run it from intraday to weekly charts. Higher timeframes produce fewer, slower patterns with less pivot noise; lower timeframes produce many more candidates with looser fits.

## Implementations in the Library

- Harmonic Pattern Detection (LuxAlgo): https://www.luxalgo.com/library/indicator/harmonic-pattern-detection/

## Related concepts

- Harmonic Patterns: https://www.luxalgo.com/library/concept/harmonic-patterns/
- ABCD: https://www.luxalgo.com/library/concept/abcd/
- Three Drives: https://www.luxalgo.com/library/concept/three-drives/
- Bat: https://www.luxalgo.com/library/concept/bat/
- Butterfly: https://www.luxalgo.com/library/concept/butterfly/
- Shark: https://www.luxalgo.com/library/concept/shark/
- Cypher: https://www.luxalgo.com/library/concept/cypher/
- 5-0: https://www.luxalgo.com/library/concept/5-0/
- Anti-patterns: https://www.luxalgo.com/library/concept/anti-patterns/
- Exotic Harmonics: https://www.luxalgo.com/library/concept/exotic-harmonics/

---

Source: https://www.luxalgo.com/library/concept/gartley/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/