OPEN-SOURCE SCRIPT

Gartley 222 Strategy (Final Full Version)

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

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。