OPEN-SOURCE SCRIPT
Squared9 Pro v1

Squared9 Pro v1.0 (strategy) combines classic Gann geometry with modern momentum checks to find high-conviction reversal zones.
The strategy requires:
1. Price to be within a user-defined percentage of Gann levels (based on recent pivot highs/lows and Square of Nine calculations).
2. Divergence on Stochastic and/or MACD (price and indicator moving in opposite directions).
3. Current price to respect the trend direction on a higher timeframe EMA.
4. A candle with a strong body relative to its range.
Here's what it looks for:
- Price is close to important Gann levels (calculated from recent swing highs/lows using Square of Nine math — shown as colored horizontal lines).
- Stochastic and MACD indicators show divergence (price makes new high/low but indicators do not — a classic reversal clue).
- The overall trend on a higher timeframe (default 4-hour) supports the trade direction via a 50-period EMA filter.
- The current candle has a strong directional body (not a doji or tiny range — minimum body size is adjustable).
When these line up, a green triangle appears below the bar for a potential long entry, or a red triangle above for short. Stop-loss and take-profit are set automatically using ATR multiples (default 1.7× for stop, 3.2× for target), with an optional trailing stop.
All settings (lookback periods, tolerances, ATR multipliers, etc.) can be changed in the inputs panel.
This script is designed for traders who want confluence-based signals rather than relying on a single indicator.
Feedback is welcome.
The strategy requires:
1. Price to be within a user-defined percentage of Gann levels (based on recent pivot highs/lows and Square of Nine calculations).
2. Divergence on Stochastic and/or MACD (price and indicator moving in opposite directions).
3. Current price to respect the trend direction on a higher timeframe EMA.
4. A candle with a strong body relative to its range.
Here's what it looks for:
- Price is close to important Gann levels (calculated from recent swing highs/lows using Square of Nine math — shown as colored horizontal lines).
- Stochastic and MACD indicators show divergence (price makes new high/low but indicators do not — a classic reversal clue).
- The overall trend on a higher timeframe (default 4-hour) supports the trade direction via a 50-period EMA filter.
- The current candle has a strong directional body (not a doji or tiny range — minimum body size is adjustable).
When these line up, a green triangle appears below the bar for a potential long entry, or a red triangle above for short. Stop-loss and take-profit are set automatically using ATR multiples (default 1.7× for stop, 3.2× for target), with an optional trailing stop.
All settings (lookback periods, tolerances, ATR multipliers, etc.) can be changed in the inputs panel.
This script is designed for traders who want confluence-based signals rather than relying on a single indicator.
Feedback is welcome.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.