Gann Angles With Volatility

This script will calculate the intraday levels using Gann angles and volatility principle.
Release Notes: In this version, I have included two more cycles. Now, five cycles will be plotted with this script.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Can you please suggest reading material for the theory behind this indicator? or provide equations used in calculation?
+18 Reply
what if the price opens at lower or upper target.Should i wait till the entry level. pl guide.
+8 Reply
pbghosh vinayak61
@vinayak61, According to GANN principle, you have to trade as per the direction given by the indicator. Otherwise, if you can trade using price action principles, then trading can be done from any level based on the price action/candlestick patterns.
+5 Reply
nice work . stay blessed
+6 Reply
Nice Study. I tried to convert it to Strategy to do some backtesting, added lines below, it enters the longs/shorts, however doesnt seem to recognize the Targets. is it bcoz the cycle could vary each day ?

// enter long strategy
strategy.entry("buy", strategy.long , when=(crossover(close, buyAbove) and year==2020 and month >=12 and dayofmonth >= 22))
strategy.exit("buy", loss=sellBelow, profit=buytarget1)

// enter Short strategy
strategy.entry("sell", strategy.short , when=(crossunder(close, sellBelow) and year==2020 and month >=12 and dayofmonth >= 22))
strategy.exit("sell", loss=buyAbove, profit=sellTarget1)
+1 Reply
Sir, This is good indicator...

Can u show an example calculation for nifty any previous day ?..

It will be great help in understanding the process...
Is this same as "Square of Nine" levels ? also what "Anchor" price it uses to base the calculation ? for example, if trading Futures like S&P e-Mini , do we use this at Globex open ( 6 PM EST ) or do we apply it at NYSE Open at 9:30 AM EST ?
pbghosh vensonom
@vensonom, This is not like "Square of Nine" levels. It uses previous day's closing price and volatility to calculate the next day's range and subsequently, it calculates the levels using Gann angles. You have to use this during the live market session to trade the levels. If the instrument opens gap-up or gap-down then the OPEN price is used to calculate the next day's range.
Nice work,
It seems the buy and sell zones are moving very early at market opening . Is it a normal behavior ?

As per my understanding the code needs the last 10 days data. With the free plan we only bewteen 8 and 9 days , so the set of datas may be moving causing this to happen ?
Home Stock Screener Forex Screener Crypto Screener Economic Calendar About Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Private Messages Chat Sign Out