INVITE-ONLY SCRIPT
Harmonic patterns

This indicator is an automated technical analysis tool designed to identify 16 different harmonic and geometric price patterns, ranging from classic Gartley and Bat patterns to exotic models like the Nen Star and Black Swan. Unlike standard detectors, this script incorporates a proprietary Similarity Rating System to help traders distinguish between high-probability setups and approximate formations.
Technical Logic and Methodology
The script utilizes a pivot-based ZigZag algorithm with a default lookback of 18 pivots to identify structural swing highs and lows. Once pivots are established, the system calculates the internal Fibonacci retracement and extension ratios between five key points (X, A, B, C, and D).
Ratio Validation: The script compares real-time price action against ideal harmonic ratios (e.g., 0.618 for Gartley’s B-point) within a user-defined error margin.
Similarity Rating: A percentage-based score is calculated by measuring the cumulative deviation of all legs from their mathematical ideals. Only patterns exceeding the 79% Similarity Threshold are displayed to ensure signal quality.
Dynamic Targets: Take Profit (TP) zones are calculated based on the vertical distance of the XA leg, projected from the D-point at 0.618, 1.0, and 1.618 levels.
How to Use
Filter Patterns: Use the "General Settings" to adjust the "Pattern Size" (bars) and the "Similarity Rating" to filter out low-quality setups.
Execution: Once a pattern is labeled (e.g., "🦋 GARTLEY"), the script draws dynamic TP boxes. Traders typically look for price rejection at the D-point before targeting TP1 or TP2.
Alerts: The script includes a universal alert condition that triggers as soon as a valid, high-rating pattern completes at the D-point.
Technical Logic and Methodology
The script utilizes a pivot-based ZigZag algorithm with a default lookback of 18 pivots to identify structural swing highs and lows. Once pivots are established, the system calculates the internal Fibonacci retracement and extension ratios between five key points (X, A, B, C, and D).
Ratio Validation: The script compares real-time price action against ideal harmonic ratios (e.g., 0.618 for Gartley’s B-point) within a user-defined error margin.
Similarity Rating: A percentage-based score is calculated by measuring the cumulative deviation of all legs from their mathematical ideals. Only patterns exceeding the 79% Similarity Threshold are displayed to ensure signal quality.
Dynamic Targets: Take Profit (TP) zones are calculated based on the vertical distance of the XA leg, projected from the D-point at 0.618, 1.0, and 1.618 levels.
How to Use
Filter Patterns: Use the "General Settings" to adjust the "Pattern Size" (bars) and the "Similarity Rating" to filter out low-quality setups.
Execution: Once a pattern is labeled (e.g., "🦋 GARTLEY"), the script draws dynamic TP boxes. Traders typically look for price rejection at the D-point before targeting TP1 or TP2.
Alerts: The script includes a universal alert condition that triggers as soon as a valid, high-rating pattern completes at the D-point.
僅限邀請腳本
僅作者批准的使用者才能訪問此腳本。您需要申請並獲得使用許可,通常需在付款後才能取得。更多詳情,請依照作者以下的指示操作,或直接聯絡abo0o。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Use on a clean chart with no extra indicators. Adjust “Pattern Size” to choose larger or smaller patterns. This tool does not give buy/sell signals; always confirm with your own analysis.
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
僅限邀請腳本
僅作者批准的使用者才能訪問此腳本。您需要申請並獲得使用許可,通常需在付款後才能取得。更多詳情,請依照作者以下的指示操作,或直接聯絡abo0o。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
Use on a clean chart with no extra indicators. Adjust “Pattern Size” to choose larger or smaller patterns. This tool does not give buy/sell signals; always confirm with your own analysis.
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。