All indicators

Butterfly Harmonic Pattern Harmonic Detector

Aug 5, 2024

Static chart image
SignalsDrawing ToolPatternsPivot Based (Retrospective)Repainting Functionality

The Butterfly Harmonic Pattern indicator is a sophisticated technical analysis tool that automatically detects and visualizes high-precision reversal structures based on specific Fibonacci ratios.

Usage

The Butterfly pattern is used to identify potential market turning points at the end of established trends. Unlike retracement-heavy patterns like the Gartley, the Butterfly is an extension pattern where the final "D" point typically extends beyond the initial "X" point.

  • Bullish Butterfly: Look for this "M" shaped formation at the end of a downtrend. A reversal is anticipated once the price hits the specified extension levels at point D.
  • Bearish Butterfly: Look for this "W" shaped formation at the end of an uptrend. This suggests a potential shift from buying pressure to selling pressure.

Traders often use this tool to set precise entry orders at point D and define stop-loss levels just beyond the harmonic structure.

Details

The Butterfly pattern, originally discovered by Bryce Gilmore, relies on precise geometric configurations. This implementation uses a ZigZag-based logic to track price swings and validate them against standard Fibonacci requirements:

  • B point retracement of XA: ~78.6%
  • D point extension of XA: 127% to 161.8%
  • BC projection: 161.8% to 224%

The indicator includes a "Valid Format" filter to ensure only the most accurate geometric structures are displayed, minimizing noise from market fluctuations.

Settings

Logical Setting

  • ZigZag Pivot Period: Adjusts the sensitivity of the swing detection. Larger values find long-term patterns, while smaller values find short-term ones.
  • Show Valid Format: When enabled, filters the output to only show patterns that strictly adhere to classical ratios without noise.
  • Show Formation Last Pivot Confirm: If enabled, the pattern only appears after the final pivot point is fully confirmed by subsequent price action.
  • Period of Formation Last Pivot: Sets the confirmation window for the final point of the pattern.

Display Setting

  • Show Bullish/Bearish Pattern: Toggles the visibility of specific pattern types.
  • Color Settings: Customizes the visual appearance of bullish and bearish formations.
  • Width Line: Adjusts the thickness of the lines forming the harmonic structure.
  • Label size: Controls the size of the XABCD labels on the chart.
  • Switching Colors Theme Mode: Provides presets for Light or Dark chart themes.

Alert

  • Alert: Toggles the alert system on or off.
  • Message Frequency: Determines if alerts trigger every time, once per bar, or only on bar close.
  • Show Alert time by Time Zone: Adjusts the timestamp in alert messages to your preferred UTC offset.

FAQ

How do I access the Butterfly Harmonic Pattern?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

What is the difference between a Butterfly and a Gartley pattern?

The main difference is the location of point D. In a Gartley, point D is a retracement within the XA leg, whereas in a Butterfly, point D extends beyond the X point.

Why did a pattern disappear from my chart?

Harmonic patterns are based on pivots. If "Show Formation Last Pivot Confirm" is off, a pattern may appear speculatively and then disappear if the price breaks the required Fibonacci ratios before the pivot is confirmed.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.