OPEN-SOURCE SCRIPT
BB Oscillator - Price Relative to Bollinger Bands

This Bollinger Band Oscillator visualizes where the current price sits relative to its Bollinger Bands, scaled between 0 and 100. It helps identify overbought and oversold conditions based on the price’s position within the bands and provides dynamic signals when momentum shifts occur.
Features
Price Relative to Bollinger Bands
The main oscillator plots the price’s relative position within the Bollinger Bands on a scale from 0 (lower band) to 100 (upper band), giving an intuitive view of where price stands.
Customizable Moving Average Overlay
An optional moving average (SMA or EMA) smooths the oscillator for trend analysis, with adjustable length and color options.
Crossover & Crossunder Signals
Alerts and background highlights trigger when the oscillator crosses over or under its moving average, signaling potential momentum shifts or trend changes.
Fully Customizable Colors
Choose your preferred colors for the oscillator line, moving average and crossover signals to match your charting style.
This tool offers a unique oscillator view of Bollinger Bands, combining volatility context with momentum signals for clearer decision-making.
Features
Price Relative to Bollinger Bands
The main oscillator plots the price’s relative position within the Bollinger Bands on a scale from 0 (lower band) to 100 (upper band), giving an intuitive view of where price stands.
Customizable Moving Average Overlay
An optional moving average (SMA or EMA) smooths the oscillator for trend analysis, with adjustable length and color options.
Crossover & Crossunder Signals
Alerts and background highlights trigger when the oscillator crosses over or under its moving average, signaling potential momentum shifts or trend changes.
Fully Customizable Colors
Choose your preferred colors for the oscillator line, moving average and crossover signals to match your charting style.
This tool offers a unique oscillator view of Bollinger Bands, combining volatility context with momentum signals for clearer decision-making.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.