Harmonic patterns

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.
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor indicadas a continuación o póngase en contacto directamente con abo0o.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
Exención de responsabilidad
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor indicadas a continuación o póngase en contacto directamente con abo0o.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.