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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.