Gartley Harmonic Pattern Harmonic Chart patterns
Jul 25, 2024

The Gartley Harmonic Pattern indicator automatically identifies and visualizes one of the most significant harmonic structures in technical analysis to help traders predict potential market reversals. By utilizing Fibonacci retracement levels and ZigZag pivots, this tool highlights high-probability "M" and "W" formations that signal upcoming bullish or bearish price action.
Usage
The Gartley Harmonic Pattern is used to identify reversal points at the end of trends or corrections.
- Bullish Gartley: Resembles an "M" shape. It occurs when an initial upward move (XA) is followed by a series of corrective waves (ABCD). Traders typically look for buying opportunities at point D, where price is expected to reverse upward.
- Bearish Gartley: Resembles a "W" shape. It forms when an initial downward move (XA) is followed by corrective waves (ABCD). Traders monitor point D for potential shorting opportunities or trend reversals to the downside.
The indicator allows users to toggle "Show Valid Format" to filter out noisy patterns and only display those that strictly adhere to classical Fibonacci ratios. Additionally, the "Last Pivot Confirm" feature helps traders wait for price confirmation before a pattern is fully validated.
Details
The script follows the specific structural rules defined by H.M. Gartley and further refined by Scott Carney. The construction relies on the following Fibonacci relationships between five key points (X, A, B, C, and D):
- B point: Ideally a 61.8% retracement of the XA leg.
- C point: A retracement of the AB leg, typically between 38.2% and 88.6%.
- D point: The final completion point, often representing a 78.6% retracement of the XA leg and an extension of the BC leg (1.13 to 1.618).
The implementation uses a ZigZag-based logic to detect pivots and calculate the geometric ratios required for harmonic validation.
Settings
Logical Setting
- ZigZag Pivot Period: Adjusts the sensitivity of the pivot detection; higher values detect major swings, while lower values detect minor fluctuations.
- Show Valid Format: When enabled, filters out patterns that do not strictly match the ideal Fibonacci ratios.
- Show Formation Last Pivot Confirm: If enabled, the pattern only completes once the final pivot is confirmed, reducing the likelihood of drawing failed patterns.
- Period of Formation Last Pivot: Sets the lookback period specifically for confirming the final D-point pivot.
Display Setting
- Show Bullish/Bearish Pattern: Toggles the visibility of specific pattern types.
- Color Bullish/Bearish Pattern: Customizes the visual color for the XABCD shapes.
- Width Line: Adjusts the thickness of the lines connecting the harmonic points.
- Label Size: Changes the size of the text labels (X, A, B, C, D) on the chart.
- Switching Colors Theme Mode: Provides presets for Light or Dark theme compatibility.
Alert
- Alert: Enables or disables alert triggering.
- Message Frequency: Controls how often alerts are sent (All, Once Per Bar, or Per Bar Close).
- Show Alert Time by Time Zone: Allows the timestamp in alert messages to be adjusted to a specific UTC offset.
FAQ
How do I access the Gartley 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 the "Valid Format" and standard mode?
The "Valid Format" setting applies a stricter filter to the Fibonacci ratios between points. In standard mode, the script may show patterns that are visually similar to a Gartley but have more "noise" or slight deviations from the ideal mathematical ratios.
Can I use this for intraday trading?
Yes, the indicator works on all timeframes. However, harmonic patterns are often considered more reliable on higher timeframes (like 1H, 4H, or Daily) as they filter out market noise more effectively than lower timeframes.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

