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.
Skrip jemputan sahaja
Hanya pengguna yang diluluskan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Ini selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi terus nishantsingh040694.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.
Arahan penulis
Penafian
Skrip jemputan sahaja
Hanya pengguna yang diluluskan oleh penulis boleh mengakses skrip ini. Anda perlu memohon dan mendapatkan kebenaran untuk menggunakannya. Ini selalunya diberikan selepas pembayaran. Untuk lebih butiran, ikuti arahan penulis di bawah atau hubungi terus nishantsingh040694.
TradingView tidak menyarankan pembayaran untuk atau menggunakan skrip kecuali anda benar-benar mempercayai penulisnya dan memahami bagaimana ia berfungsi. Anda juga boleh mendapatkan alternatif sumber terbuka lain yang percuma dalam skrip komuniti kami.