OPEN-SOURCE SCRIPT

Gartley 222 Strategy (Final Full Version)

272
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.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.