Concept

Butterfly

Butterfly is a Elliott & Harmonics concept. The Library holds 1 implementation, a working definition you can pull into Quant.

Top Butterfly indicator

The top custom implementation, built on the original standard Butterfly formula.

1 total

From studying Butterfly to trading it: take the implementation below into Quant and backtest it instantly.

What is the Butterfly Pattern?

The Butterfly is an XABCD harmonic extension pattern associated with Bryce Gilmore and Larry Pesavento: unlike the Gartley or Bat, its D point completes beyond the X extreme. The common definition places B at a deep 0.786 retracement of XA, C at 0.382 to 0.886 of AB, and D at a 1.27 extension of XA, with 1.618 as the usual outer limit and an extended AB=CD often terminating in the same zone.

The lineage is unusually well documented. H. M. Gartley's Profits in the Stock Market (1935) supplied the retracement template that XABCD patterns descend from; Bryce Gilmore's ratio-based swing work and Larry Pesavento's Fibonacci Ratios with Pattern Recognition (1997) developed the Butterfly, a structure completing beyond the initiating extreme; and Scott Carney's Harmonic Trading books standardized the ratio grid most detection tools now implement, fixing the deep 0.786 B as its signature.

In practice the pattern builds a potential reversal zone in advance: the 1.27 XA projection, a BC extension commonly in the 1.618 to 2.24 band, and the completion of an extended AB=CD are stacked, and tighter overlap earns the zone more weight. All of the numbers come from the shared harmonic and Fibonacci ratio set; the Butterfly is simply the arrangement whose D leg extends beyond X instead of retracing within XA.

Because completion prints past the prior extreme, the Butterfly forms at fresh highs or lows: price runs the old extreme into the projected extension zone, and traders watch that area for reversal. The placement makes it a tool for fading terminal moves and an unforgiving one when the extension keeps extending, which is why most treatments require confirmation at D and abandon the pattern beyond the 1.618 XA level.

How to identify a Butterfly pattern on a chart

The pattern is measured, not eyeballed: identification is a sequence of ratio checks against the XA leg.

  1. 1Anchor X and A at a clear swing: XA is the baseline impulse every later ratio is measured against, so ambiguous pivots corrupt the whole grid.
  2. 2Check B: a retracement of about 0.786 of XA. A shallow B near 0.382 to 0.50 points to a Bat instead, and a B beyond X voids the structure.
  3. 3Check C: a retracement of AB inside the 0.382 to 0.886 band, holding short of A.
  4. 4Project D: the 1.27 extension of XA beyond the X extreme, cross-checked against the BC projection and an extended AB=CD finishing in the same area.
  5. 5Demand the new extreme: a valid Butterfly completes outside X; a turn before the prior extreme is taken out belongs to the retracement family instead.
  6. 6Wait for behavior in the zone: a rejection bar, a structure shift, or a failed push, rather than resting a blind limit order at 1.27.

How it's calculated

A five-point XABCD extension pattern that completes beyond X, at a 1.27 to 1.618 extension of the opening XA leg.

1. Mark five alternating swing pivots X, A, B, C, D forming legs XA, AB, BC, CD (XA an advance for the bullish pattern, a decline for the bearish one).
2. Require the defining mid-point B: abs(B - A) / abs(A - X) = 0.786.
3. Require the pivot C: abs(C - B) / abs(B - A) between 0.382 and 0.886.
4. Project D as a BC extension: abs(D - C) / abs(C - B) between 1.618 and 2.618.
5. Require completion beyond X: abs(D - A) / abs(A - X) between 1.27 and 1.618, with 1.27 the ideal completion.
6. The pattern completes when price reaches D, where the XA extension and the BC extension windows overlap.
X: price of the pattern's starting pivot
A: price of the pivot ending the opening leg XA
B: price of the pivot ending leg AB
C: price of the pivot ending leg BC
D: completion price of the pattern, beyond X
XA, AB, BC, CD: the four legs, named by their endpoint pivots
abs(): absolute value of the price difference
0.786: defining XA retracement at B, with 0.786 = sqrt(0.618)
0.382 to 0.886: retracement window for C relative to AB
1.618 to 2.618: extension window for D relative to BC
1.27 to 1.618: extension window for D relative to XA

Introduced by Bryce Gilmore and Larry Pesavento and standardized by Scott Carney, whose ideal Butterfly completes at exactly 1.27 of XA with B fixed at 0.786.

Completions stretching toward 1.618 of XA are the extended variant, and Carney's ideal spec keeps the BC projection tame at 1.618 to 2.24; an AB = CD or extended AB = CD structure usually forms inside the pattern.

Automated detection typically allows a small tolerance around each ratio.

How traders use it

  • To fade terminal extensions: traders project the 1.27 XA level in advance, wait for price to spike beyond the old extreme into the zone, and look for rejection before positioning, with early targets at retracements of the AD swing.
  • To frame failed-breakout ideas: a completion just beyond X resembles a run of the prior extreme, so some traders pair Butterfly completions with failed-breakout or liquidity-sweep logic as confirmation.
  • For invalidation discipline: the band between 1.27 and 1.618 of XA defines the tolerance; sustained trade beyond 1.618 voids the Butterfly, and the move is reassessed as a deeper extension structure or a plain continuation rather than a late completion.
  • As one vote in a wider harmonic scan: detectors flag Butterflies alongside the rest of the harmonic patterns family, and many users act only when a completion lands on independent structure such as a higher-timeframe level.
  • For exit planning rather than reversal trading: a Butterfly completing against an open trend position marks a location to tighten stops or scale out without taking a countertrend entry.

Butterfly vs neighboring harmonic patterns

Crab: Both complete beyond X, but the Crab stretches to a 1.618 XA extension with a shallower B (0.382 to 0.618), while the Butterfly completes at 1.27 with a deep 0.786 B.

Gartley: The Gartley completes inside the XA leg at a 0.786 retracement; the Butterfly uses 0.786 at the B point instead and completes outside XA at an extension.

Three Drives: Three Drives reaches its terminal zone through three symmetric pushes with corrective pauses rather than one XABCD structure. Both are extension-completion templates in the Pesavento lineage, and both demand a reaction before entry.

Concept family

Elliott & Harmonics

33 concepts mapped · 33 in the Library

Butterfly FAQ

Turn Butterfly into a trading strategy.

Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it in conversation.