OPEN-SOURCE SCRIPT

Gartley 222 Strategy (Final Full Version)

287
Gartley 222 Strategy (Bullish Pattern) — Repaint-Free, Backtestable

This strategy is based on the classic Gartley 222 harmonic pattern, originally introduced by H.M. Gartley in Profits in the Stock Market (1935). It identifies potential bullish reversal zones by detecting a five-point retracement structure (X-A-B-C-D) using pivot points and Fibonacci confluence.

🧠 Strategy Logic:
Detects valid pivot-based X, A, B, C points

Validates Gartley ratios:

AB = 61.8%–78.6% of XA

CD = 78.6%–88.6% of AB

Enters long at point D only after pivot confirmation (non-repainting)

Exits at 127% Fibonacci extension of XA or on stop loss

🔍 Features:
✅ Repaint-free and fully backtestable

✅ Visual X–A–B–C–D pattern lines on chart

✅ Customizable pivot length, risk, and reward ratios

✅ Alerts for real-time Gartley Buy pattern completion

Ideal for swing traders using 4H or Daily timeframes on trending instruments like NIFTY, BANKNIFTY, or major stocks.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.