Butterfly pattern rules: origin and the ratio checklist

Scott Carney, who coined the term harmonic trading, credits Bryce Gilmore with discovering the general extension structure of the Butterfly. The pattern is also often linked with Larry Pesavento, whose books on Fibonacci ratios and price patterns helped spread these zigzags among traders.

The exact ratios most people use today come from Carney, who set them in his first book, The Harmonic Trader (1998). He made the 0.786 retracement at B a strict requirement and called the 1.27 projection of XA the most critical number in the pattern. Other sources let D stretch to 1.618 of XA: TradingView’s help page for its XABCD tool describes the A-to-D swing as a 127.2% or 161.8% extension of XA. Treat the numbers below as one school’s conventions, applied with a small tolerance, not as laws of the market. Check the legs in order; if B fails, stop there.

  • XA: the first swing, from a low to a high in a bullish Butterfly (a high to a low in a bearish one). Every other ratio depends on where you put X and A, so use clear, completed swings.
  • B: a 0.786 retracement of XA. This is the defining ratio. A B near 0.618 points to a Gartley, a B near 0.382–0.50 to a Bat or a Crab, and a B beyond X ends the pattern.
  • C: a 0.382–0.886 retracement of AB.
  • D: a 1.27 extension of XA, beyond X. Some traders accept up to 1.618; past that, the pattern is usually treated as broken.
  • BC projection: the CD leg measures 1.618–2.24 times BC (Carney mentions up to 2.618 in extreme cases).
  • AB=CD: CD should be at least as long as AB and is often 1.27 times AB, the alternate AB=CD covered in the AB=CD pattern lesson.

Why D goes beyond X: an extension pattern

In a Gartley or a Bat, D completes inside the XA leg, at 0.786 or 0.886, so X is still intact and works as the stop: if price trades through X, the pattern is gone. In a Butterfly, D completes 27% of XA beyond X. By the time the pattern is ready, X has already been broken, and the stops of traders who bought near X have probably been hit.

That is the idea behind the pattern: a final push to a new low that runs out of sellers. It is also why the stop logic changes. A stop just below X makes no sense in a bullish Butterfly, because price is already below X when you buy. The stop goes beyond the PRZ, the zone where the pattern says the move should end, as the drawing below shows. If price keeps going well past that zone, the extension was not exhaustion but a trend.

Extension pattern
A harmonic pattern whose D completes beyond X, at more than 100% of XA. The Butterfly (1.27) and the Crab (1.618) are the two classic ones.
1.27 XA extension
The level 1.27 times the XA leg away from A, which is 0.27 of XA beyond X. With X at $100 and A at $120, it sits at $94.60.
PRZ (potential reversal zone)
The band where the XA extension, the BC projection and the AB=CD measurement cluster. You watch it for a reversal; you do not buy it blindly.
Alternate AB=CD
A CD leg 1.27 (or 1.618) times as long as AB instead of equal to it. In the Butterfly, 1.27 is the common one.

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

Two panels: on the left, a bullish Gartley whose D stays above the dashed X line (D = 0.786 XA), with a red dashed stop just below X, a check mark and the note stop beyond X; on the right, a bullish Butterfly whose D falls below the X line (D = 1.27 XA) into a yellow band, a red cross with the note X already broken: not a stop, and a red dashed stop under the band with a check mark and the note stop beyond the PRZ.

How to build the Butterfly PRZ

A single ratio is a line; a PRZ is where several independent measurements agree. For a bullish Butterfly, work out three groups of levels below C, then look for the place where they bunch together. For a bearish one, flip the signs: the levels sit above C.

  1. XA extension: D = A − 1.27 × XA. Mark 1.618 too, as the outer limit.
  2. BC projection: D = C − 1.618 × BC, C − 2.0 × BC and C − 2.24 × BC.
  3. AB=CD: D = C − AB, and the alternate D = C − 1.27 × AB.
  4. Circle the tightest cluster that includes the 1.27 XA level. That band is the PRZ; the scattered levels are noise.
  5. If no two levels fall close together, there is no clean PRZ and no trade. Write the band down before price gets there.

Bullish Butterfly example: measuring the pattern

A hypothetical 1-hour chart of a stock, shaped like the drawing at the top of the page. X is a swing low at $100.00 and A a swing high at $120.00. Check each point, then build the zone:

  • XA = $120.00 − $100.00 = $20.00.
  • B = $120.00 − 0.786 × $20.00 = $104.28, so AB = $15.72.
  • C = $113.00: BC = $8.72, and $8.72 ÷ $15.72 = 0.555 of AB, inside 0.382–0.886.
  • 1.27 XA: $120.00 − $25.40 = $94.60, which is $5.40 below X. The 1.618 limit is $87.64.
  • BC projections: 1.618 × $8.72 puts D at $98.89, 2.0 at $95.56 and 2.24 at $93.47.
  • AB=CD: equal legs put D at $97.28; the 1.27 alternate at $113.00 − $19.96 = $93.04.
  • PRZ: $93.04 to $94.60, where the 1.27 XA level, the 2.24 BC projection and the 1.27 AB=CD meet. The other levels are too scattered to count.

Trading the bullish example: entry, stop, targets and size

Price falls into the zone and trades down to $93.30. The next 1-hour candle closes at $94.80 with a long lower wick, back above the top of the PRZ: a hammer, in the language of candlestick patterns. You buy at $94.80. Touching the zone was not the signal; the close back out of it was.

The stop goes below the PRZ, not below X at $100.00, which is above your entry. Take the bottom of the zone, $93.04, and add a buffer, here half of a hypothetical 1-hour average true range of $1.70: the stop sits at $92.20, $2.60 below the entry.

A common target convention is the 0.382 and 0.618 retracements of the AD leg, measured from the actual low. AD = $120.00 − $93.30 = $26.70, so the targets are $103.50 and $109.80. The first pays $8.70, about 3.3R; the second about 5.8R. Those multiples describe geometry, not odds: a stop just under a fresh low gets hit often, and many PRZs fail. See the risk-reward ratio guide.

Size: risking 1% of a $20,000 account ($200) allows 76 shares ($200 ÷ $2.60). Many traders take part of the position off at the first target and move the stop to breakeven; scaling in and out covers the trade-offs, and the position size calculator does the arithmetic.

Bearish Butterfly example

The bearish Butterfly is the mirror image, and it ends with a push to a new high. Hypothetical: X is a swing high at $50.00 and A a swing low at $40.00, so XA = $10.00. B rallies to $47.86 (0.786 of XA, AB = $7.86) and C pulls back to $43.50 (BC = $4.36, or 0.555 of AB).

The measurements above C: the 1.27 XA extension at $40.00 + $12.70 = $52.70, the 2.24 BC projection at $43.50 + $9.77 = $53.27 and the 1.27 AB=CD at $43.50 + $9.98 = $53.48. The PRZ is $52.70 to $53.48, above X at $50.00, as the drawing below shows.

Price spikes to $53.10, inside the zone, and a candle closes at $52.40 with a long upper wick, a shooting star. You short at $52.40 with a stop above the PRZ: $53.48 plus half of a hypothetical $0.80 ATR, or $53.90, which risks $1.50. AD = $53.10 − $40.00 = $13.10, so the targets are $48.10 (0.382) and $45.00 (0.618): about 2.9R and 4.9R on paper. Risking $200 allows 133 shares. Shorting has its own risks, such as gaps above the stop and borrowing costs; see short selling.

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

A bearish Butterfly with hypothetical prices: X at 50.00, A at 40.00, B at 47.86 (B = 0.786 XA), C at 43.50 (C = 0.555 AB) and D at 53.10, above a dashed line at the X level and labeled D above X (D = 1.27 XA); a yellow band labeled PRZ around D, a red sell triangle and a red arrow down from D, and a red dashed stop line over the band labeled stop above the PRZ.

How to draw a Butterfly on TradingView

TradingView has no separate Butterfly tool: you draw it with the XABCD Pattern tool, in the Patterns group of the drawing toolbar on the left of the chart. You place each point yourself, and the tool prints the leg ratios on dotted lines between the points; its help page names the BC retracement along line AC and the CD extension along line BD.

  1. Find a completed XA swing on your timeframe and select XABCD Pattern. Click X, A, B and C in that order; in a bullish Butterfly X, B and D are lows, A and C are highs.
  2. Check B with the Fib retracement tool: drag it across XA so that 0 sits at A and 1 at X (swap the clicks if it comes out reversed). B should sit near the 0.786 line.
  3. In the same tool’s settings, switch on the 1.272 and 1.618 levels (add 1.272 as a custom level if your list lacks it). With 1 at X, both fall beyond X and frame the D zone.
  4. Mark the BC projections with a second Fib retracement across BC, 0 at C and 1 at B: its 1.618, 2 and 2.24 levels (add 2.24 by hand) sit where those projections fall. Add the AB=CD levels, then draw a rectangle over the tightest cluster.
  5. Place D inside the PRZ, set an alert at the edge of the zone with TradingView alerts and wait for a candle to close. Practice on old charts with bar replay, and never drag the points afterwards to fit a reversal.

Common Butterfly mistakes, and when the pattern fails

Same hypothetical bullish pattern, a different day: the hammer closes at $94.80 and you buy, then the whole market keeps falling and price trades through $92.20 to $90.00. The stop costs about $198 (76 shares × $2.60): planned and survivable. The pattern was simply wrong, which happens often.

The habits that turn that kind of loss into a large one:

  • Putting the stop below X. In a bullish Butterfly X is above the entry, so it cannot be the stop, and traders who then “put it somewhere lower” without a rule often end up with none.
  • Buying the 1.27 level blind with a limit order. Price can run straight to 1.618 or further; TradingView’s help page treats a move beyond 161.8% as a broken bullish Butterfly.
  • Calling any deep pullback a Butterfly. Without B near 0.786, it is a different pattern or none.
  • Ignoring the bigger trend. A new low inside a strong daily downtrend is more often continuation than exhaustion; check multi-timeframe analysis.
  • Moving X, A or D after the fact so the ratios fit. A pattern drawn after the reversal always looks perfect; log the ones you drew in advance in a trading journal.
  • Trusting the R multiple. A 3R target is worth little if the stop is hit most of the time; trading the PRZ covers confirmation in more depth.

Butterfly vs Crab: how to tell them apart

The Butterfly and the Crab are the two classic extension patterns: in both, D completes beyond X and the stop goes beyond the PRZ. The drawing below puts them side by side on the same scale.

Look at B first, then at how far D runs. The Crab’s D sits much farther from X, and its last leg is longer and usually faster, so its PRZ is often reached in a hurry.

  • B: 0.786 of XA in the Butterfly; 0.382–0.618 in the Crab (0.886 in the Deep Crab).
  • D: 1.27 of XA in the Butterfly (up to 1.618 in some rule sets); 1.618 in the Crab.
  • CD: 1.618–2.24 times BC in the Butterfly; 2.24–3.618 in the Crab.
  • Both: the stop goes beyond the PRZ, never beyond X, and the trade waits for a closed reversal candle.

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

Two lettered zigzags on the same scale, each with a dashed line at the X level and dotted lines at the 1.27 and 1.618 extensions: on the left, a Butterfly whose D is circled on the 1.27 line, with B = 0.786 XA, D = 1.27 XA and CD = 1.618–2.24 BC; on the right, a Crab whose D is circled on the 1.618 line, with B = 0.382–0.618 XA, D = 1.618 XA and CD = 2.24–3.618 BC.