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.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน