OPEN-SOURCE SCRIPT
Updated Bollinger Band Lathe

Bollinger Bands shown with a horizontal basis, to make it easier to see how volatility is changing and identify squeeze opportunities.
There is a histogram (purple) which shows how the basis is changing, and a price line (yellow) showing the location of the price within the bollinger bands.
It is tuned to 2 STDEV, but shows the area within 1 STDEV a different color to help visualize when the price is near the extremes of the bands.
By default this uses an exponential moving average to calculate the bollinger basis, but this can be changed in the options.
There is a histogram (purple) which shows how the basis is changing, and a price line (yellow) showing the location of the price within the bollinger bands.
It is tuned to 2 STDEV, but shows the area within 1 STDEV a different color to help visualize when the price is near the extremes of the bands.
By default this uses an exponential moving average to calculate the bollinger basis, but this can be changed in the options.
Release Notes
Made it so the inner bollinger envelope multiple can be modified, and added an optional alternate calculation for stdev which uses the two-pass algorithm which I believe is more accurate than the builtin. Default options are to enable the custom stdev implementation and use EMA for the bollinger basis.Release Notes
Updating to apply a scale factor while calculating the bollinger mean and deviation to increase precision with tiny cryptocurrency exchange rates.Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
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.