OPEN-SOURCE SCRIPT
Gabriel Cypher Pattern Detector

Bullish: X low → A high → B at 0.382–0.618 of XA → C at 1.130–1.414 extension of XA → D projected at 0.786 of XC
Bearish: exact mirror
When C confirms, it labels "waiting for D" and draws a dashed line at the projected D price
When D is hit (the trigger you asked for): draws the full X-A-B-C-D legs, marks D as the Breakout Point, and draws the Breakout Range — T1 at 0.382 and T2 at 0.618 retrace of the CD leg — plus a dotted stop line just beyond X
Alert fires on D-hit stating bullish/bearish with entry, stop, T1, T2 prices (use "Any alert() function call" as before)
Pattern invalidates automatically if price runs beyond X before reaching D
Fib tolerance is adjustable in settings (default ±6%) since real charts rarely hit ratios perfectly.
Bearish: exact mirror
When C confirms, it labels "waiting for D" and draws a dashed line at the projected D price
When D is hit (the trigger you asked for): draws the full X-A-B-C-D legs, marks D as the Breakout Point, and draws the Breakout Range — T1 at 0.382 and T2 at 0.618 retrace of the CD leg — plus a dotted stop line just beyond X
Alert fires on D-hit stating bullish/bearish with entry, stop, T1, T2 prices (use "Any alert() function call" as before)
Pattern invalidates automatically if price runs beyond X before reaching D
Fib tolerance is adjustable in settings (default ±6%) since real charts rarely hit ratios perfectly.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.