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.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.