OPEN-SOURCE SCRIPT

Volatility Bands by DGT

Updated
Volatility represents how large an asset's prices swing around the mean price, the degree of variation of a trading price over time, and is commonly measured with beta (β) coefficients, standard deviations (σ) of returns where tools such as Average True Range, Bollinger Bands, Keltner Channel, Squeeze Indicator, etc presents volatility concept

Volatility often refers to the amount of uncertainty or risk related to the size of changes in a security's value. The higher the volatility, the riskier the security - the price of the security can change dramatically over a short time period in either direction. A lower volatility - security's value does not fluctuate dramatically, and tends to be more steady

This study, Volatility Bands, attempts to present a way to measure and visualize volatility, using standard deviations (σ) and average true range indicator, and aims to point out areas that might indicate potential trading opportunities

I will try to explain the usage with examples,

snapshot

same setup with different option selected

snapshot

as you may observe from the examples different setting may have advantages and disadvantages over one another, it is recommended to verify a trading setup with different available options.
Additionally, It is recommended to use this indicator in conjunction with other technical indicators, or verify using chart/candle patterns. Below is an usage example using in conjunction with other indicator, in the given example “Neglected Volume by DGT” is selected

snapshot


Similarities and Differences

Bollinger Bands depicts two standard deviations above and below a simple moving average, and Keltner Channel depicts two times average true range (ATR) above and below an exponential moving average

Volatility Bands study combines the approach of both Bollinger Bands and Keltner Channel, with different settings and different visualization

Default settings are one standard deviations and one time average true range (ATR) above and below 13 period exponential moving average. Setting can be adjusted by users but let me remind all testes are performed with the default settings.

Mathematically expressed as
Upper band area between “ema + stdev” and “ema + atr”
Lower band area between “ema – stdev” and “ema – atr”

A different display is added with the inspiration I get from one of the quantgym ‘s study, many thanks quantgym 😉

When difference band display is selected the study will reflect the area between “ema + stdev – atr” and “ema – stdev + atr”. As shown in the examples above

Note: standard deviation calculation can be adjusted based on price action or its moving average.

Other differentiation between BB and KC is with V-BANDS mostly we look for trade opportunities when price action move out of the bands and in most cases we assume market is consolidating when the price action is within the bands

The other indicator that presents similarities to Volatility Bands is Squeeze Indicator, which measures the relationship between Bollinger Bands and Keltner's Channels to help identify consolidations and signal when prices are likely to break out. Mainly Volatility Bands is different version of Squeeze indicator, in fact the purpose is almost same but visualization is completely different. Additionally Volatility Bands Offers trading opportunities whereas Squeeze indicator only presents market states unless a momentum indicator is adapted to Squeeze indicator.

Disclaimer:
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely

The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
Release Notes
Logistic EMA added as optional basis for volatility bands

for details of Logistic EMA you are invited to check "Logistic EMA w/ Signals by DGT" study
Release Notes
minor update :

color of standard deviation line differentiated from atr line

hence,
- ability to view atr and stdev changes independetly
- ability to identify squeeze regions clearly
Average True Range (ATR)bandBollinger Bands (BB)DGTdifferenceKeltner Channels (KC)logisticsqueezewidth

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