OPEN-SOURCE SCRIPT
Cập nhật Price oscillator [Session Adjusted]

Price Oscillator
This indicator combines directional momentum bias with dynamic volatility analysis, helping traders identify both trend direction and potential exhaustion zones.
Core Concept
The oscillator calculates the percentage deviation of price from a session-adjusted moving average (close / MA - 1).
The histogram is plotted as always-positive columns (green when price is above the MA, red when below). This design enables a clear visual comparison between momentum strength and the Bollinger Band Width (BBW).
When the colored columns cross above the BBW line, it signals an over-extended condition, often indicating a high probability of imminent correction or mean reversion.
Volatility Analysis
The blue BBW line is a key element of the indicator:
- Rising BBW (positive slope) indicates volatility expansion — typically associated with strong trending moves or breakout phases.
- Falling BBW (negative slope) indicates volatility contraction — often signaling consolidation periods or impending explosive moves.
Main Features
Adaptive Lookback Period:
Automatically adjusts based on the selected session duration (default 24 hours), providing timeframe consistency.
Flexible Smoothing:
Choose between SMA, EMA, RMA, or WMA for the reference moving average.
Dual Signal System:
Colored columns show momentum direction and strength.
BBW line reveals both the level and the direction (slope) of volatility.
Exhaustion Zones:
Crosses between momentum columns and BBW act as dynamic overbought/oversold signals.
How to Use
Directional Bias Filter: Green columns = bullish bias | Red columns = bearish bias.
Volatility Regime: Use the slope of the BBW line to distinguish between trending (expanding volatility) and consolidating (contracting volatility) environments.
Correction Signals: Watch for strong momentum columns crossing above the BBW line — this frequently precedes pullbacks or reversals.
Particularly effective on Forex pairs and European indices (DAX, CAC40, FTSEMIB, etc.) on 1H to 4H, and Daily timeframes.
This indicator combines directional momentum bias with dynamic volatility analysis, helping traders identify both trend direction and potential exhaustion zones.
Core Concept
The oscillator calculates the percentage deviation of price from a session-adjusted moving average (close / MA - 1).
The histogram is plotted as always-positive columns (green when price is above the MA, red when below). This design enables a clear visual comparison between momentum strength and the Bollinger Band Width (BBW).
When the colored columns cross above the BBW line, it signals an over-extended condition, often indicating a high probability of imminent correction or mean reversion.
Volatility Analysis
The blue BBW line is a key element of the indicator:
- Rising BBW (positive slope) indicates volatility expansion — typically associated with strong trending moves or breakout phases.
- Falling BBW (negative slope) indicates volatility contraction — often signaling consolidation periods or impending explosive moves.
Main Features
Adaptive Lookback Period:
Automatically adjusts based on the selected session duration (default 24 hours), providing timeframe consistency.
Flexible Smoothing:
Choose between SMA, EMA, RMA, or WMA for the reference moving average.
Dual Signal System:
Colored columns show momentum direction and strength.
BBW line reveals both the level and the direction (slope) of volatility.
Exhaustion Zones:
Crosses between momentum columns and BBW act as dynamic overbought/oversold signals.
How to Use
Directional Bias Filter: Green columns = bullish bias | Red columns = bearish bias.
Volatility Regime: Use the slope of the BBW line to distinguish between trending (expanding volatility) and consolidating (contracting volatility) environments.
Correction Signals: Watch for strong momentum columns crossing above the BBW line — this frequently precedes pullbacks or reversals.
Particularly effective on Forex pairs and European indices (DAX, CAC40, FTSEMIB, etc.) on 1H to 4H, and Daily timeframes.
Phát hành các Ghi chú
New Feature: Dynamic Volatility LevelsAdded dynamic highest expansion and lowest contraction levels for the Bollinger Band Width (BBW).
These levels automatically adapt to the selected Volatility lookback (days) period (default 25 days).
Displayed as subtle circle markers:
- Red circles = Highest BBW (maximum volatility expansion observed in the period)
- Green circles = Lowest BBW (maximum volatility contraction observed in the period)
Benefits of this update
Provides contextual volatility boundaries that adjust to changing market regimes.
Helps traders better identify when current volatility is relatively high (near red circles) or low (near green circles).
Improves the interpretation of BBW crosses with the momentum columns by offering dynamic reference levels instead of fixed ones.
Particularly useful on Forex and European indices, where volatility behavior changes significantly between sessions and market conditions.
Other Changes
Default smoothing method changed to RMA for slightly faster responsiveness.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.