Gann Spiral / Square of 9

The Gann Spiral, more commonly known as the Square of 9 is one of the most well known tools that Gann used. Today, it is most commonly used to find possible support and resistance levels, and possible reversals in time.

This indicator is a more flexible version of the traditional Gann Spiral / Square. This is achieved by allowing you to change:

  • Price and Time direction
  • The timeframe
  • How often to draw lines based on degrees
  • Toggles for Price and Time
  • Price and Time line customization

How to use:

1 - Select your desired starting value of Price and Time.
2 - Choose the direction of Price and Time.
3 - Choose the amount of lines to display.
4 - Choose how often for lines to be drawn (Rotation Degree Value).


Side Note:

This uses a more proper and more accurate formula to "navigate the square". (Sqr x + 2)^2 is not the formula used, but rather (Sqr x + 1)^2.

If you wish to use the formula you're used to, change Full Revolution Value to 180.

The reasoning behind this formula change is because I re-created the square in the form of an actual spiral. The issue with such a conversion is that the formula used to construct it uses one Pi. If you understand circles, you should know that we're off by 180 degrees. A full rotation is 360, not 180.

Correcting for this error requires a slight but important change in the formula, that being +1 instead of +2. This not only corrects it to fit for a proper spiral, but also makes it easier to use fractions. 1/360 results in 1 degree. This slight formula change makes it incompatible when used on the actual Square of 9, however it is technically the more accurate formula.

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。