OPEN-SOURCE SCRIPT

BB Expansion Oscillator (BEXO)

67
BB Expansion Oscillator (BEXO) is a custom indicator designed to measure and visualize the expansion and contraction phases of Bollinger Bands in a normalized way.

🔹 Core Features:

Normalized BB Width: Transforms Bollinger Band Width into a 0–100 scale for easier comparison across different timeframes and assets.

Signal Line: EMA-based smoothing line to detect trend direction shifts.

Histogram: Highlights expansion vs contraction momentum.

OB/OS Zones: Detects Over-Expansion and Over-Contraction states to spot potential volatility breakouts or squeezes.

Dynamic Coloring & Ribbon: Visual cues for trend bias and crossovers.

Info Table: Displays real-time values and status (Expansion, Contraction, Over-Expansion, Over-Contraction).

Background Highlighting: Optional visual aid for trend phases.

🔹 How to Use:

When BEXO rises above the Signal Line, the market is in an Expansion phase → potential trend continuation.

When BEXO falls below the Signal Line, the market is in a Contraction phase → potential consolidation or trend weakness.

Overbought/Over-Expansion zone (above OB level): Signals high volatility; watch for possible reversal or breakout exhaustion.

Oversold/Over-Contraction zone (below OS level): Indicates a squeeze or low volatility; often precedes strong breakout moves.

🔹 Best Application:

Identify volatility cycles (squeeze & expansion).

Filter trades by volatility conditions.

Combine with price action, volume, or momentum indicators for confirmation.

⚠️ Disclaimer:
This indicator is for educational and research purposes only. It should not be considered financial advice. Always combine with proper risk management and your own trading strategy.

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.