OPEN-SOURCE SCRIPT

Gartley 222 Strategy (Final Full Version)

1 613
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提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。