[ChasinAlts] Best Volatility Indicator

I hope you all enjoy this one as it does a great job at finding runners I did try to search for an example script to reference for quite a while when i first dreamt up this idea bc needed assistance implementing it. This script in particular was one that I began long ago but got put on the back-burner because I couldn't figure out how to implement the flow of logic until I came across a library titled 'Conditional Averages' and published by the “Pinecoders" account. Thus, the logic in this code is partially derived from that(www.tradingview.com/...ConditionalAverages/). To understand what the functions/logic do in the beginning of the 'Functions'' section, you must understand how TV presents it's data through the charts.

Wether on the 1sec TF or the 1day (or ANY other), the only time TV prints a bar/candle is when a trade occurs for that asset (i.e. a change in volume). Even if Open=Close on the same candle, the candle will print with the updated price. The % of candles printed out of the TOTAL possible amount that COULD HAVE been printed is the ultimate output that’s calculated in the script. So, if the lookback setting=10min on the 1min TF and only 7 out of the last 10 candles have printed then the value will appear as 70(%). There are MANY benefits to using this method to measure volatility but its vital to recall that the indicator does nothing to provide the direction of future price movement. One thing I’ve noticed is that when a coin is just beginning it’s ascent and its move is considerably larger/longer than all the other coins OR the plots angle is very steep, it is usually the end of a move and the direction is about to abruptly reverse, continuing with it’s volatility. As volatility increases more and more the plot gets brighter and brighter…and also vise versa.

The settings are as follows:
1) which set of Kucoin’s Margin Coins to use (8 possible sets with 32 coins in each set).
2) input how many minutes ago to start counting the total printed candles from (i.e. if setting is input as 1440, count begins from exactly 24hrs(1440min) ago to present candle.
3) there are 3 different lines to choose from to be able to plot:
i. ‘Includes Open==Close’ = adds to count when bar prints but price does NOT change (=t1)
ii. ‘Does NOT include Open==Close’ = count ONLY updates upon price movement (=t2)

iii. ‘Difference’ = (( t1 - t2 ) / t1 ) *100

*** I’ve got some more great ones I will be uploading soon. Just have to create a description for them
Peace out,
- ChasinAlts

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.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?