OPEN-SOURCE SCRIPT
Bollinger Bands Difference Score

Bollinger Bands Difference Score (TradingView – Pine Script v6)
The **Bollinger Bands Difference Score** is a volatility-based scoring system designed to help traders quickly assess whether a stock is in a **strong trend, neutral zone, or weak setup**. It transforms the raw **Bollinger Band Width (BB-Diff)** into a **normalized score (0–100)** and classifies conditions with intuitive thresholds.
---
### 🔹 What is Bollinger Bands Difference (BB-Diff)?
* **Bollinger Bands** are built from a moving average with upper and lower bands set by standard deviations.
* The **difference (or width)** between the bands reflects market volatility.
* A **high difference** = wide bands = strong volatility (breakout/trend).
* A **low difference** = narrow bands = low volatility (consolidation).
This indicator standardizes BB-Diff into a score and smooths it for cleaner signals.
---
### 🔹 Key Features
1. **BB-Diff Scoring System**
* Converts Bollinger Band width into a **0–100 normalized score**.
* Higher score → higher volatility/trend strength.
* Lower score → consolidation or weaker momentum.
2. **Signal Levels**
* **Strong Zone (≥ 70):** Indicates strong trend strength or expansion in volatility.
* **Neutral Zone (40–70):** Sideways or undecided price action.
* **Weak Zone (≤ 20):** Suggests very low volatility, potential upcoming squeeze.
3. **Score Smoothing**
* Applies a moving average to reduce noise.
* Helps avoid false signals during choppy markets.
4. **Visual Enhancements**
* Plots the score as a line (0–100 scale).
* Adds horizontal reference lines for **Strong**, **Neutral**, and **Weak** levels.
* Background colors automatically highlight **bullish strength (green)** or **weakness (red)**.
---
### 🔹 How to Use
* **Trend Confirmation:**
Look for scores **above 70** → suggests trend continuation or volatility breakout.
* **Consolidation Watch:**
Scores in the **20 or below** zone may precede volatility squeezes → breakout setups.
* **Neutral Zone:**
Scores between **40–70** suggest sideways price action; avoid aggressive trades.
* **Combine with Price Action:**
Use with support/resistance, candlestick patterns, or momentum indicators for confirmation.
---
### 🔹 Best Practices
* Great as a **volatility filter** before entries.
* Use in combination with **RSI, MACD, or OBV** for directional bias.
* Works well for **breakout trading** (when score rises from low levels).
* Monitor on multiple timeframes for alignment.
---
✅ **In summary:** The **Bollinger Bands Difference Score** is a simple yet powerful tool that quantifies volatility strength into an actionable score, making it easier to spot strong trends, consolidation phases, and potential breakout opportunities.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。