OPEN-SOURCE SCRIPT

Linear GANN 2.0 - Adib Noorani

3 244
Linear GANN 2.0 is a clean, visually unobtrusive indicator designed to automatically plot key mathematical price levels on your chart. Instead of manually drawing horizontal lines every day, this script instantly applies a massive array of predefined Gann-based numerical levels, saving you time and keeping your analysis consistent.

The Math Behind the Indicator
TradingView requires transparency in how indicators are calculated. This script does not use moving averages or volume; instead, it plots a hardcoded sequence of mathematical values inspired by Gann theory and the Square of Nine.

If you look at the underlying array, the price levels follow a distinct geometric sequence based on squares. The pattern alternates between perfect odd squares and even squares plus one:

1
5 (which is 2² + 1)
9 (which is 3²)
17 (which is 4² + 1)
25 (which is 5²)
37 (which is 6² + 1)
...and so on, scaling all the way up to accommodate high-value assets like Bitcoin or major indices.

How to Use It in Your Trading
Because these numbers act as psychological and mathematical pivot points, traders can use these lines as traditional Support and Resistance zones.

1. Trend Continuations - If the price breaks cleanly above a Gann line and retests it, that level often flips from resistance to support. The next line up becomes your logical take-profit target.
2. Reversals - Watch for exhaustion or liquidity sweeps around these exact levels. If price wicks heavily at one of these lines, it can signal a potential reversal.

Key Features
Dynamic Labels - To prevent chart clutter, the price labels are coded to constantly push to the far right edge of your screen, mimicking the native price scale.
Infinite Lines - The lines use the `extend.both` property, meaning no matter how far back or forward you scroll, your levels are always there.
Customization - Fully customizable line thickness and colors to match both dark and light themes, with a toggle to turn labels on or off.

Always use candlestick patterns or consolidation breakouts around the GANN levels to enter with good Risk : Reward

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.