TradingView
Trendoscope
Feb 5, 2021 11:12 AM

Bollinger Bands - Custom moving average 

Berkshire Hathaway Inc. NewNYSE

Description

Formula for bollinger bands is as below:

Mid = sma(20)
Top = sma(20) + 2*StdDev(20)
Bottom = sma(20) - 2*StdDev(20)

While standard bollinger bands allow changing standard deviation and length, there is no option to use different moving average.

This indicator allows you to define bollinger bands based on different moving average types which can be selected from input.

Release Notes

Convert to function

Release Notes

Added another type of base : dc - which stands for Donchian Channel. Instead of using moving average as base, here we are using donchian channel mid as base and applying 2 standard deviation on this to derive top and bottom.
More