OPEN-SOURCE SCRIPT
Gann Sq9 Levels - @darshakssc

Gann Square of 9 (Sq9) is one of W.D. Gann's most powerful tools for identifying
price support and resistance levels. This indicator applies the core Sq9 formula —
stepping ±0.25 increments on the square root of a base price — to automatically
plot key levels directly on your chart.
𝗛𝗼𝘄 𝗶𝘁 𝘄𝗼𝗿𝗸𝘀:
The indicator takes a base price (session high/low midpoint, session open, previous
close, or manual input) and calculates symmetrical resistance levels (R1–R6) above
and support levels (S1–S6) below using the Gann Sq9 formula:
Level = (√Base ± n × 0.25)²
𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀:
- Automatic Gann Sq9 support and resistance levels
- 4 base price modes: Session Mid, Session Open, Previous Close, Manual
- Clean dashboard showing R3 → LTP → S3 at a glance
- Price proximity alerts when approaching key levels
- Fully customisable colors and level count (1 to 10 each side)
- No repainting — all levels calculated and drawn on confirmed data
- Works on all instruments and timeframes (best on 5m, 15m, 1H intraday)
𝗛𝗼𝘄 𝘁𝗼 𝘂𝘀𝗲:
R1 and S1 are your primary levels for the session. Price respecting R1 = bearish
bias; price holding above S1 = bullish bias. Use R2/S2 as targets and R3/S3 as
extended targets or stop zones.
𝗕𝗮𝘀𝗲 𝗣𝗿𝗶𝗰𝗲 𝗚𝘂𝗶𝗱𝗲:
→ Session Mid (H+L/2) — recommended for intraday
→ Session Open — for gap-based analysis
→ Previous Close — for overnight/positional setups
→ Manual — for custom anchoring to any reference price
𝗧𝗶𝗺𝗲𝗳𝗿𝗮𝗺𝗲𝘀: Best on 5m / 15m / 30m / 1H
𝗜𝗻𝘀𝘁𝗿𝘂𝗺𝗲𝗻𝘁𝘀: Indices, Stocks, Futures, Forex, Crypto
⚠ This indicator is for educational and analytical purposes only.
It does not constitute financial advice. Always use your own judgment and
risk management when trading.
price support and resistance levels. This indicator applies the core Sq9 formula —
stepping ±0.25 increments on the square root of a base price — to automatically
plot key levels directly on your chart.
𝗛𝗼𝘄 𝗶𝘁 𝘄𝗼𝗿𝗸𝘀:
The indicator takes a base price (session high/low midpoint, session open, previous
close, or manual input) and calculates symmetrical resistance levels (R1–R6) above
and support levels (S1–S6) below using the Gann Sq9 formula:
Level = (√Base ± n × 0.25)²
𝗙𝗲𝗮𝘁𝘂𝗿𝗲𝘀:
- Automatic Gann Sq9 support and resistance levels
- 4 base price modes: Session Mid, Session Open, Previous Close, Manual
- Clean dashboard showing R3 → LTP → S3 at a glance
- Price proximity alerts when approaching key levels
- Fully customisable colors and level count (1 to 10 each side)
- No repainting — all levels calculated and drawn on confirmed data
- Works on all instruments and timeframes (best on 5m, 15m, 1H intraday)
𝗛𝗼𝘄 𝘁𝗼 𝘂𝘀𝗲:
R1 and S1 are your primary levels for the session. Price respecting R1 = bearish
bias; price holding above S1 = bullish bias. Use R2/S2 as targets and R3/S3 as
extended targets or stop zones.
𝗕𝗮𝘀𝗲 𝗣𝗿𝗶𝗰𝗲 𝗚𝘂𝗶𝗱𝗲:
→ Session Mid (H+L/2) — recommended for intraday
→ Session Open — for gap-based analysis
→ Previous Close — for overnight/positional setups
→ Manual — for custom anchoring to any reference price
𝗧𝗶𝗺𝗲𝗳𝗿𝗮𝗺𝗲𝘀: Best on 5m / 15m / 30m / 1H
𝗜𝗻𝘀𝘁𝗿𝘂𝗺𝗲𝗻𝘁𝘀: Indices, Stocks, Futures, Forex, Crypto
⚠ This indicator is for educational and analytical purposes only.
It does not constitute financial advice. Always use your own judgment and
risk management when trading.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.