javabgar

[jav] Better Bollinger Bands

Better Bollinger Bands (BBB)
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.






Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?