OPEN-SOURCE SCRIPT
[jav] Better Bollinger Bands

Better Bollinger Bands (BBB)
This script is a modification of classic Bollinger Bands (BB).
CHARACTERISTICS
Main improvement over BB:
Other features:
CALCULATIONS
The calculation of BBB is done by adding three different contributions:
RESULTS
It looks like BBB follows prices more smoothly (without the typical overshoots of BB). Also, it fits extreme values with higher accuracy. Finally, usually it doesn't cross through prices at less relevant, intermediate higher highs or lower lows, which can be advantageous.
See the comparison between red BBB vs blue BB:

Both vwma and ema seem to give decent BBB values using the standard length of 20 bars.
This script is a modification of classic Bollinger Bands (BB).
CHARACTERISTICS
Main improvement over BB:
- There is no need to introduce a standard deviation multiplier (usually 2).
- Here, only a length is needed (usually 20 bars for BB).
Other features:
- The type of moving average can be selected: sma, ema, vwma, wma or rma.
- An inner band is plotted as an additional indication of approaching extreme levels.
- Classic BB can also be shown on the graph for the sake of comparison.
CALCULATIONS
The calculation of BBB is done by adding three different contributions:
- Standard deviation of price
- Standard deviation of (price minus moving average)
- Average of (high - low) over length.
RESULTS
It looks like BBB follows prices more smoothly (without the typical overshoots of BB). Also, it fits extreme values with higher accuracy. Finally, usually it doesn't cross through prices at less relevant, intermediate higher highs or lower lows, which can be advantageous.
See the comparison between red BBB vs blue BB:
Both vwma and ema seem to give decent BBB values using the standard length of 20 bars.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。