All Harmonic Patterns
Jul 29, 2024

The All Harmonic Patterns indicator is a comprehensive tool designed to automatically identify, draw, and alert users to a wide variety of harmonic price structures as they form in real-time. By automating the detection of complex patterns such as Gartleys, Bats, and Butterflies, it aims to provide traders with consistent technical analysis across multiple timeframes and markets.
Usage
This tool can be used to identify potential reversal or continuation points based on historical price action and Fibonacci relationships.
- Pattern Visualization: The indicator automatically plots the legs of each pattern on the chart. Bearish patterns are typically highlighted in red, while bullish patterns are highlighted in green (customizable in settings).
- Strategy Integration: Users can utilize these patterns as a confluence for existing strategies. For example, a Bullish Gartley forming at a major support level might indicate a high-probability long entry.
- Backtesting: By applying the indicator to Bar Replay mode, traders can study how different harmonic patterns performed historically on specific assets.
- Alerts: Each pattern has an independent alert toggle, allowing traders to be notified only for the specific structures that fit their trading plan.
Details
The script identifies patterns based on a sequence of swing highs and swing lows. A swing high is defined as a peak formed by a green candle (or series of green candles) followed by a red candle, while a swing low is a trough formed by red candles followed by a green candle.
Patterns are calculated using retracement and extension ratios, which are the percentage differences between consecutive price ranges. Because "perfect" harmonic ratios are rare in live markets, the script incorporates Measurement Tolerances. This allows the logic to identify patterns that are technically valid within a specific percentage of deviation from the ideal Fibonacci levels.
The indicator currently supports the following patterns:
- Classic: ABCD, Gartley, Bat, Alternate Bat, Butterfly, Crab, Deep Crab.
- Modern/Complex: 5-0, Cypher, Shark, Three-Drive.
- Proprietary/Custom: Cassiopeia (A, B, and C variants).
Settings
Pattern Colours
- Bearish Pattern Colour: Sets the color for bearish harmonic shapes and lines.
- Bullish Pattern Colour: Sets the color for bullish harmonic shapes and lines.
- Neutral Pattern Colour: Sets the color for neutral structures.
- Dotted Line Colour: Sets the color for the internal projection lines.
Patterns
- Show [Pattern Name]: Individual toggles to enable or disable the detection and drawing of specific patterns (e.g., Show Bear 5-0, Show Bull ABCD).
Pattern Tolerances
- AB/BC/CD/AD/XC Tolerance (%): Adjusts the allowable percentage deviation for each leg of the harmonic patterns. Increasing these values will result in more patterns being detected, while decreasing them requires stricter adherence to Fibonacci ratios.
Alerts
- [Pattern] Alert: Individual toggles to enable TradingView alerts for each specific pattern type.
FAQ
How do I access All Harmonic Patterns? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why do some patterns disappear or change? Harmonic patterns are based on swing points. As new price data arrives, a swing point may be redefined if a higher high or lower low is formed before the swing is "confirmed," which in turn updates the pattern logic.
Which markets work best with this indicator? While it works on all timeframes, it is recommended for use on 24-hour markets (like Forex or Crypto) to minimize the impact of price gaps, which can occasionally affect the swing detection logic.
Sources
Edwards, R., & Magee, J. (1948) Technical Analysis of Stock Trends.
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.

