What are harmonic patterns? The XABCD legs

A harmonic pattern is a zigzag of five turning points joined by four legs: XA, AB, BC and CD. Each leg is measured as a Fibonacci fraction of an earlier one, and the pattern counts only when those fractions land in set ranges. The drawing at the top of this page shows a bullish Gartley: price rises from X to A, pulls back to B, bounces to C and falls to D, where buyers are expected.

A bullish pattern ends with a drop into D and looks like an M; a bearish one is the mirror image and looks like a W. Like the double bottom in chart patterns, harmonics try to mark where a move will stall, but with measured legs instead of a shape.

X
The starting low (bullish pattern) or high (bearish). In the Gartley and the Bat, price must not trade past it.
XA leg
The first and usually the largest swing. B and D are measured as fractions of it.
BC and CD legs
BC is a smaller bounce inside AB. Its size sets how far the final leg, CD, is projected to D.
PRZ (potential reversal zone)
The price band around D where several measurements cluster: a place to watch for a reversal, not a price to buy blindly.

Who created harmonic patterns?

The oldest piece is a chart on page 222 of H.M. Gartley’s 1935 book, Profits in the Stock Market, hence the nickname “Gartley 222”. The book gave no Fibonacci ratios. Authors added them decades later, and not all the same ones.

Most modern rules come from Scott Carney, who coined the term “harmonic trading” and set the ratios of the ideal Gartley in his first book, The Harmonic Trader, in the late 1990s. He named the Crab and the Bat (which he dates to 2001) and introduced the 0.886 retracement that defines the Bat. For the Butterfly, he credits Bryce Gilmore with the basic structure and set its ratios himself. His Harmonic Trading, Volume One and Volume Two both came out in 2010.

So the “standard” ratios below are one school’s conventions, not laws of the market. Even TradingView’s help page gives a narrower C range for the Gartley than Carney does.

Why Fibonacci ratios? Where the numbers come from

The ratios come from the same sequence as the Fibonacci retracement tool. A Fibonacci number divided by the next one approaches 0.618, and divided by the one two places up, 0.382. Flip 0.618 and you get 1.618, the golden ratio; 1.618 squared is 2.618.

The rest are derived: 0.786 is the square root of 0.618, 0.886 the square root of 0.786, and 1.27 roughly the square root of 1.618. Ratios below 1 measure a pullback inside a leg; ratios above 1 project a leg beyond its start.

The drawing below shows the familiar single-swing version, with the 50–61.8% band shaded and a buy signal near 61.8%. A harmonic pattern applies the same fractions to several legs at once and looks for a price where they agree. None of this proves that markets obey a number sequence.

Turn your phone sideways to read the drawing. Tap to close.

A hand-drawn chart from a swing low to a swing high with retracement levels at 23.6%, 38.2%, 50%, 61.8% and 78.6%, the 50–61.8% band shaded yellow, and a buy signal near 61.8%.

Gartley, Bat, Butterfly and Crab patterns: the ratio rules

The drawing below puts the four classics side by side, each with a dashed line at the X level. These are the commonly published ranges, mostly from Carney’s work; other sources differ slightly, and all of them allow a small tolerance.

  • Gartley: B at 0.618 of XA; C at 0.382–0.886 of AB; D at 0.786 of XA, with a BC projection of 1.27–1.618 and CD about equal to AB. D may overshoot 0.786 slightly but must not pass X.
  • Bat: B shallower than 0.618 of XA, ideally 0.382–0.50; C at 0.382–0.886 of AB; D at 0.886 of XA, close to X, with a BC projection of 1.618–2.618 and CD often 1.27 times AB.
  • Butterfly: B at 0.786 of XA; C at 0.382–0.886 of AB; D at a 1.27 extension of XA, beyond X (some traders also use 1.618); CD equal to AB or up to 1.27 times it.
  • Crab: B at 0.382–0.618 of XA; C at 0.382–0.886 of AB; D at a 1.618 extension of XA, far beyond X, with an extreme BC projection of 2.24–3.618. Carney warns that price often moves violently into this PRZ.
  • To tell them apart, look at B first (0.618: Gartley; 0.382–0.50: Bat or Crab; 0.786: Butterfly), then at whether D stays inside XA or runs past X.

Turn your phone sideways to read the drawing. Tap to close.

Four small hand-drawn lettered zigzags side by side, each with a dashed line at the X level and its name and D ratio: Gartley (D = 0.786 XA), Bat (D = 0.886 XA), Butterfly (D = 1.27 XA, below X) and Crab (D = 1.618 XA, far below X).

The AB=CD pattern: the building block

The AB=CD is the simplest harmonic pattern, and it sits inside the other four: a move from A to B, a partial retracement to C, and a final leg CD roughly equal to AB in price. The drawing below shows a bullish one, with C a lower high at about 0.618 of AB.

The rules: C retraces 0.382–0.886 of AB. A 0.618 retracement at C pairs with a 1.618 projection of BC, a 0.786 retracement with a 1.27 projection. When CD stretches to 1.27 or 1.618 times AB, it is called an alternate AB=CD.

Hypothetical: a stock falls from A at $60.00 to B at $55.00, then bounces to C at $58.09, a 0.618 retracement. CD = AB puts D at $53.09, and 1.618 times the $3.09 BC leg lands there too; that agreement is the point. If price instead slices through $53.09 on large candles and closes well below it, there is no reversal to trade.

Turn your phone sideways to read the drawing. Tap to close.

A hand-drawn AB=CD pattern: A a high, B a low, C a lower high at about 0.618 of AB, and D a low where CD is as long as AB; two brackets mark the equal legs AB = CD, and a buy triangle prints at D.

The PRZ: why the reversal zone is a band, not a price

The PRZ is the band where the pattern’s measurements cluster: the XA ratio, the BC projection and the AB=CD. They rarely land on the same cent, so the reversal area is a zone. A tight cluster makes a clear zone; scattered measurements mean a weak pattern, or none.

A hypothetical bullish Gartley, shaped like the drawing at the top: X at $100.00, A at $110.00 (a $10.00 XA leg), B at $103.82 (0.618 of XA) and C at $107.64 (0.618 of AB). The three measurements for D:

  • 0.786 of XA: $110.00 − $7.86 = $102.14.
  • AB = CD: AB is $6.18, so D = $107.64 − $6.18 = $101.46.
  • BC projection of 1.27–1.618: BC is $3.82, so D lands between $102.79 and $101.46.
  • PRZ: roughly $101.46 to $102.79, with the 0.786 line at $102.14 in the middle. X at $100.00 is the line a Gartley must not cross.

How to trade a harmonic pattern: confirmation, stop, target and size

Reaching the PRZ is not the signal. Wait for a candle to close back out of the zone in the reversal direction, such as a hammer or a bullish engulfing candle from the candlestick patterns guide; a wick proves nothing until the close. A PRZ on a level traders already watch, such as old support, deserves more attention.

UpTickFlow, our invite-only TradingView indicator, works on the same confirmation-first principle, so weigh this accordingly. It does not detect harmonic patterns. It waits for a candle to close at a level, draws an entry, a stop and a target before the trade, scores the setup from 0 to 100 and stays quiet in chop: a second check, not a scanner.

In the example, price drops to $101.90 and a 1-hour candle closes at $102.50 with a long lower wick; you buy there. The usual stop for a Gartley or a Bat is just beyond X, since trading through X breaks the pattern: $99.90, or $2.60 of risk per share. A tighter stop just beyond the PRZ, at $101.30, risks $1.20 but gets hit more often. In a Butterfly or a Crab, D is already past X, so the stop goes beyond the PRZ; TradingView’s help page notes that a move beyond 161.8% breaks a bullish Butterfly.

A widely used target convention is the 0.382 and 0.618 retracements of AD, measured from the actual low: AD is $8.10 ($110.00 down to $101.90), so the targets are $104.99 and $106.91. The first is $2.49 from the entry: about 1R with the wide stop and about 2R with the tight one, as in the drawing below. If the first target does not pay enough for your stop, skip the trade rather than shrink the stop. See the risk-reward ratio and stop loss and take profit guides.

Size: risking 1% of a $10,000 account ($100) allows 38 shares with the wide stop ($100 ÷ $2.60) and 83 with the tight one ($100 ÷ $1.20). Same dollar risk, different share count; the position size calculator does the math.

  1. Mark the pattern on completed swings and write down the PRZ before price arrives.
  2. Check the context: a known level, and a higher timeframe that is not fighting you. See multi-timeframe analysis.
  3. Wait for a candle to close back out of the zone.
  4. Stop beyond X (Gartley, Bat) or beyond the PRZ (Butterfly, Crab); targets at 0.382 and 0.618 of AD.
  5. Size the trade so a stop-out is a small, fixed loss, and skip it if the first target pays less than your minimum.

Turn your phone sideways to read the drawing. Tap to close.

A hand-drawn trade plan: an entry line, a red box down to the stop labeled risk = 1R, a green box up to the target labeled reward = 2R, and a note reading R:R = 1:2.

When harmonic patterns fail, and why they are subjective

Harmonic patterns fail often, and a failure looks exactly like the setup at first. Same hypothetical Gartley, another day: the candle closes back up at $102.50 and you buy, then the whole market sells off and price trades through $101.30 and then through X at $100.00. With the sizes above, either stop costs about $100: planned and survivable. Price breaking X also means the Gartley was never there.

Skipping confirmation is worse. A limit order resting at $102.14 because “D = 0.786” fills on the way down with no buyers in sight, and a trader with no stop is still holding at $98.00, hoping. The deeper problem is that harmonics are subjective:

  • You choose the pivots. Move X or A and every ratio, and the PRZ, moves with it.
  • Tolerances are loose and sources disagree, so many zigzags fit some pattern, and one book’s valid Gartley is another’s invalid one.
  • Hindsight looks perfect. Drawn after the reversal, a pattern always fits; drawn in advance, many break or never complete.
  • They appear on every timeframe. On a 5-minute chart small zigzags fit some pattern all day, so use only PRZs at levels from a higher timeframe.
  • No ratio measures the news, the direction of the market or volume. A ratio is not a reason for price to turn.

How to draw harmonic patterns on TradingView

TradingView’s built-in tool is called XABCD Pattern, in the Patterns group of the drawing toolbar on the left of the chart. Its help page describes it as a way to highlight five-point patterns, with each point placed by hand; an ABCD Pattern tool covers the four-point version.

  1. Find a completed XA leg on your timeframe, one you could point to without zooming in.
  2. Select XABCD Pattern and click X, A, B and C in that order. In a bullish pattern X, B and D are lows, and A and C are highs.
  3. Place D at the projected PRZ, then move it to the actual turn once it forms. The Coordinates settings set each point exactly, by bar and price.
  4. Read the ratios: the help page shows the BC retracement along the line AC and the CD extension along the line BD. Check B and D against XA with the Fib retracement tool, and compare with the rules above.
  5. Draw it before price reaches the zone, and don’t drag the points afterwards to fit a reversal.