This oscillator is designed to adapt its calculations based on market volatility, creating a dynamic and movement-sensitive indicator without using fixed or arbitrary lengths. It works by adjusting its sensitivity and smoothing based on the volatility of recent price action. The script utilizes the following core components:
Volatility-Driven Adaptive Length: The adaptive length is calculated from the Average True Range (ATR) over a long period. This length dynamically adjusts between a minimum length and the maximum length allowed, ensuring that the oscillator's responsiveness aligns with current market conditions.
Directional Movement with Adaptive Smoothing: Using an exponential moving average (EMA) of up and down price movements, this component calculates adaptive averages for upward and downward movement. The length of the EMA is set by the adaptive length, creating a response that mirrors recent volatility.
Ratio-Based Oscillator Calculation: The oscillator value is calculated based on the ratio of average upward to downward movement. This ratio is transformed into a range centered around zero, with values oscillating between positive and negative regions based on the strength of directional movement.
Dynamic Normalization: To stabilize the oscillator and provide a bounded range, the script normalizes it against the highest and lowest values over a large window (4999 bars or the adaptive length, whichever is greater). This scaling ensures that the oscillator is calibrated to recent highs and lows, eliminating the need for arbitrary limits.
Adaptive Smoothing: The final oscillator output is smoothed with a secondary adaptive EMA, where the smoothing factor is dynamically set to half of the current volatility length. This creates a responsive but stable line that adapts as market volatility changes.
Multi-Level Visual Reference Lines: Several horizontal reference lines are plotted to guide interpretation:
High (50): Indicates potential overbought levels. Tending/Rejection (25) and Rejection/Trending (-25): Mark areas where reversals or continuations might be expected. Mid (0): The central line around which the oscillator oscillates. Low (-50): Represents potential oversold levels. This oscillator aims to capture directional momentum dynamically, allowing for adaptable, real-time analysis of price action with smooth, volatility-adjusted responses. It’s useful for detecting shifts in market momentum, particularly in trending or highly volatile environments.
Because the lengths are so long this can be used on really small time frames
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.