OPEN-SOURCE SCRIPT

John Bollinger's Bollinger Bands

494
Japanese below / 日本語説明は下記

This indicator replicates how John Bollinger, the inventor of Bollinger Bands, uses Bollinger Bands, displaying Bollinger Bands, %B and Bandwidth in one indicator with alerts and signals.

Bollinger Bands is created by John Bollinger in 1980s who is an American financial trader and analyst. He introduced %B and Bandwidth 30 years later.


🟦 What's different from other Bollinger Bands indicator?
Unlike the default Bollinger Bands or other custom Bollinger Bands indicators on TradingView, this indicator enables to display three Bollinger Bands tools into a single indicator with signals and alerts capability.

You can plot the classic Bollinger Bands together with either %B or Bandwidth or three tools altogether which requires the specific setting(see below settings).
This makes it easy to quantitatively monitor volatility changes and price position in relation to Bollinger Bands in one place.


🟦 Features:
  • Plots Bollinger Bands (Upper, Basis, Lower) with fill between bands.

  • Option to display %B or Bandwidth with Bollinger Bands.

  • Plots highest and lowest Bandwidth levels over a customizable lookback period.

  • Adds visual markers when Bandwidth reaches its highest (Bulge) or lowest (Squeeze) value.

  • Includes ready-to-use alert conditions for Bulge and Squeeze events.



📈Chart
Green triangles and red triangles in the bottom chart mark Bulges and Squeezes respectively.

snapshot


🟦 Settings:
  • Length: Number of bars used for Bollinger Band middleline calculation.

  • Basis MA Type: Choose SMA, EMA, SMMA (RMA), WMA, or VWMA for the midline.

  • StdDev: Standard deviation multiplier (default = 2.0).

  • Option: Select "Bandwidth" or "%B" (add the indicator twice if you want to display both).

  • Period for Squeeze and Bulge: Lookback period for detecting the highest and lowest Bandwidth levels.(default = 125 as specified by John Bollinger )

  • Style Settings: Colors, line thickness, and transparency can be customized.




📈Chart
The chart below shows an example of three Bollinger Bands tools: Bollinger Band, %B and Bandwidth are in display.
To do this, you need to add this indicator TWICE where you select %B from Option in the first addition of this indicator and Bandwidth from Option in the second addition.


snapshot



🟦 Usage:
🟠Monitor Volatility:
Watch Bandwidth values to spot volatility contractions (Squeeze) and expansions (Bulge) that often precede strong price moves.

John Bollinger defines Squeeze and Bulge as follows;

Squeeze:
The lowest bandwidth in the past 125 period, where trend is born.

Bulge:
The highest bandwidth in the past 125 period where trend is going to die.


According to John Bollinger, this 125 period can be used in any timeframe.


📈Chart1
Example of Squeeze

You can see uptrends start after squeeze(red triangles)
snapshot

📈Chart2
Example of Bulge
You can see the trend reversal from downtrend to uptrends at the bulge(green triangles)

snapshot

📈Chart3
Bulge DOES NOT NECESSARILY mean the beginning of a trend in opposite direction.

For example, you can see a bulge happening in the right side of the chart where green triangles are marked. Nevertheless, uptrend still continues after the bulge.
In this case, the bulge marks the beginning of a consolidation which lead to the continuation of the trend. It means that a phase of the trend highlighted in the light blue box came to an end.

snapshot
Note: light blue box is not drawn by the indicator.


Like other technical analysis methods or tools, these setups do not guarantee birth of new trends and trend reversals. Traders should be carefully observing these setups along with other factors for making decisions.


🟠Track Price Position:
Use %B to see where price is located in relation to the Bollinger Bands.
If %B is close to 1, the price is near upper band while %B is close to 0, the price is near lower band.

🟠Set Alerts:
Receive alerts when Bandwidth hits highest and lowest values of bandwidth, helping you prepare for potential breakout, ending of trends and trend reversal opportunities.

🟠Combine with Other Tools:
This indicator would work best when combined with price action, trend analysis, or
market environmental analysis.

—————————————————————————————

このインジケーターはボリンジャーバンドの考案者であるジョン・ボリンジャー氏が提唱するボリンジャーバンドの使い方を再現するために、ボリンジャーバンド、%B、バンドウィズ(Bandwidth) の3つを1つのインジケーターで表示可能にしたものです。シグナルやアラートにも対応しています。

ボリンジャーバンドは1980年代にアメリカ人トレーダー兼アナリストのジョン・ボリンジャー氏によって開発されました。彼はその30年後に%Bとバンドウィズを導入しました。


🟦 他のボリンジャーバンドとの違い
TradingView標準のボリンジャーバンドや他のボリンジャーバンドとは異なり、このインジケーターでは3つのボリンジャーバンドツールを1つのインジケーターで表示し、シグナルやアラート機能も利用できるようになっています。

一般的に知られている通常のボリンジャーバンドに加え、%Bやバンドウィズを組み合わせて表示でき、設定次第では3つすべてを同時にモニターすることも可能です。これにより、価格とボリンジャーバンドの位置関係とボラティリティ変化をひと目で、かつ定量的に把握することができます。


🟦 機能:
  • ボリンジャーバンド(アッパーバンド・基準線・ロワーバンド)を描画し、バンド間を塗りつぶし表示。

  • オプションで%Bまたはバンドウィズを追加表示可能。

  • バンドウィズの最高値・最安値を、任意の期間で検出して表示。

  • バンドウィズが指定期間の最高値(バルジ※)または最安値(スクイーズ)に達した際にシグナルを表示。

※バルジは一般的にボリンジャーバンドで用いられるエクスパンションとほぼ同じ意味ですが、定義が異なります。(下記参照)

  • バルジおよびスクイーズ発生時のアラート設定が可能。



📈 チャート例

下記チャートの緑の三角と赤の三角は、それぞれバルジとスクイーズを示しています。

snapshot


🟦 設定:
  • Length: ボリンジャーバンドの基準線計算に使う期間。

  • Basis MA Type: SMA, EMA, SMMA (RMA), WMA, VWMAから選択可能。

  • StdDev: 標準偏差の乗数(デフォルト2.0)。

  • Option: 「Bandwidth」または「%B」を選択(両方表示するにはこのインジケーターを2回追加)。

  • Period for Squeeze and Bulge: Bandwidthの最高値・最安値を検出する期間(デフォルトはジョン・ボリンジャー氏が推奨する125)。

  • Style Settings: 色、線の太さ、透明度などをカスタマイズ可能。



📈 チャート例

下のチャートは「ボリンジャーバンド」「%B」「バンドウィズ」の3つを同時に表示した例です。
この場合、インジケーターを2回追加し、最初に追加した方ではOptionを「%B」に、次に追加した方では「Bandwidth」を選択します。


snapshot




🟦 使い方:
🟠 ボラティリティを監視する:

バンドウィズの値を見ることで、価格変動の収縮(スクイーズ)や拡大(バルジ)を確認できます。
これらはしばしば強い値動きの前兆となります。


ジョン・ボリンジャー氏はスクイーズとバルジを次のように定義しています:

スクイーズ: 過去125期間の中で最も低いバンドウィズ→ 新しいトレンドが生まれる場所。

バルジ: 過去125期間の中で最も高いバンドウィズ → トレンドが終わりを迎える場所。

この「125期間」はどのタイムフレームでも利用可能とされています。


📈 チャート1
スクイーズの例
赤い三角のスクイーズの後に上昇トレンドが始まっているのが確認できます。


snapshot


📈 チャート2
バルジの例
緑の三角のバルジの箇所で下降トレンドから上昇トレンドへの反転が見られます。


snapshot


📈 チャート3
バルジが必ずしも反転を意味しない例

下記のチャート右側の緑の三角で示されたバルジの後も、上昇トレンドが継続しています。
この場合、バルジは反転ではなく「トレンド一時的な調整(レンジ入り)」を示しており、結果的に上昇トレンドが継続しています。
この場合、バルジは水色のボックスで示されたトレンドのフェーズの終わりを示しています。


snapshot
※水色のボックスはインジケーターが描画したものではありません。



また、他のテクニカル分析と同様に、これらのセットアップは必ず新しいトレンドの発生やトレンド転換を保証するものではありません。トレーダーは他の要素も考慮し、慎重に意思決定する必要があります。


🟠 価格とボリンジャーバンドの位置関係を確認する:

%Bを利用すれば、価格がバンドのどこに位置しているかを簡単に把握できます。
%Bが1に近ければ価格はアッパーバンド付近、0に近ければロワーバンド付近にあります。


🟠 アラートを設定する:

バンドウィズが一定期間の最高値または最安値に到達した際にアラートを設定することで、ブレイクアウトやトレンド終了、反転の可能性に備えることができます。


🟠 他のツールと組み合わせる:

このインジケーターは、プライスアクション、トレンド分析、環境認識などと組み合わせて活用すると最も効果的です。

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.