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.






สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?