OPEN-SOURCE SCRIPT

Historical Volatility Percentile: Price and Volume

This is an expansion of the Historical Volatility scripts to include both price and volume volatility.

As Tradingview states:
Historical Volatility is a measure of how much price (and now volume ) deviates from its average in a specific time period that can be set. The more price (or/and volume ) fluctuates, the higher the indicator value. Please note it does not measure the direction of price (and volume ) changes, just how volatile price/ volume has become. There are several reasons to care about volatility but it's mainly a risk measure. As volatility increases, so does risk and uncertainty and vice versa. Traders can use the indicator to flag instruments with high volatility which could point to a trend change. It is often used in combination with other signals.

Example options
snapshot

Example formats
snapshot

Link back to some other great ideas:
@Cheatcountry with his prolific sharing, what a great inspiration.
@Picte and his inspired idea.
@Balipour and his great script


Comparing this to other significant HVP indicators
snapshot
Release Notes
Updating to Pinescript Version 5, added titles
Thanks Zettt
Historical VolatilityVolatilityVolume

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 publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer