Gann Square Levels 1 to infinity by Nishant

This indicator plots dynamic horizontal price levels based on the squares of whole numbers (1², 2², 3², …) with a small adjustment rule: if a square ends with an even digit, 1 is added to make it odd (for example, 4² = 16 → 17). The script displays a configurable number of the nearest levels above and below the current price and updates automatically as price moves.
Key features • Dynamic: shows N levels above and below the current price (default 5 each) and updates live.
• Adjustment rule: every square that ends with an even digit is incremented by 1 to make it odd.
• Highly configurable: customize number of levels, colors, line width, line style, and line extension (None / Left / Right / Both).
• Labels: optional labels show level values.
• Efficient: searches near sqrt(price) to keep calculations fast and avoid TradingView object limits.
• Safe object handling: the script deletes and recreates lines/labels safely to avoid runtime errors.
Inputs / user controls • Number of Levels Above/Below — how many levels are shown on each side of price.
• Above Price Line Color / Below Price Line Color — choose distinct colors for clarity.
• Line Width — thickness of plotted lines.
• Line Style — Solid, Dashed, Dotted, Arrow Left/Right/Both.
• Line Extension — None, Left, Right, Both (choose how lines extend across the chart).
• Auto Update — toggle live updates on/off.
• Show Level Labels — toggle numeric labels.
Recommended usage • Best used as a reference grid for support/resistance planning, confluence studies, and alert generation.
• Works on any timeframe and instrument, but consider increasing Number of Levels for instruments with very high price scales (or leave default and let the script pick nearest levels).
• Combine with volume, momentum, or price-action signals for higher-probability setups.
Skript nur auf Einladung
Ausschließlich Nutzer mit einer Erlaubnis des Autors können Zugriff auf dieses Script erhalten. Sie müssen diese Genehmigung bei dem Autor beantragen. Dies umfasst üblicherweise auch eine Zahlung. Wenn Sie mehr erfahren möchten, dann sehen Sie sich unten die Anweisungen des Autors an oder kontaktieren Sie nishantsingh040694 direkt.
TradingView empfiehlt NICHT, für die Nutzung eines Scripts zu bezahlen, wenn Sie den Autor nicht als vertrauenswürdig halten und verstehen, wie das Script funktioniert. Sie können außerdem auch kostenlose Open-Source-Alternativen in unseren Community-Scripts finden.
Hinweise des Autors
Haftungsausschluss
Skript nur auf Einladung
Ausschließlich Nutzer mit einer Erlaubnis des Autors können Zugriff auf dieses Script erhalten. Sie müssen diese Genehmigung bei dem Autor beantragen. Dies umfasst üblicherweise auch eine Zahlung. Wenn Sie mehr erfahren möchten, dann sehen Sie sich unten die Anweisungen des Autors an oder kontaktieren Sie nishantsingh040694 direkt.
TradingView empfiehlt NICHT, für die Nutzung eines Scripts zu bezahlen, wenn Sie den Autor nicht als vertrauenswürdig halten und verstehen, wie das Script funktioniert. Sie können außerdem auch kostenlose Open-Source-Alternativen in unseren Community-Scripts finden.