OPEN-SOURCE SCRIPT

Adjusted Average Volatility

By snake1754
This Pine Script calculates the average volatility over the past 20 bars by taking the difference between the high and low prices. It then adjusts this volatility based on the previous closing price: if the price is below $20, the volatility is multiplied by 2, and if it’s above $20, the volatility is multiplied by 1.5. The adjusted volatility is then plotted on the chart, helping traders visualize how volatility changes relative to the asset's price level.
Chart patterns

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?

Disclaimer