VIDYA Bollinger Bands (VIDYABB)
The VIDYA Bollinger Bands indicator combines the adaptive smoothing capabilities of VIDYA (Variable Index Dynamic Average) with statistical Bollinger Bands to provide enhanced trend analysis with dynamic volatility bands. This indicator creates a sophisticated approach to trend identification by applying an adaptive moving average that responds to market momentum and surrounding it with volatility-based bands.
How It Works
The indicator operates in two main stages:
- VIDYA Calculation: Uses the Chande Momentum Oscillator (CMO) to create an adaptive smoothing factor that adjusts to market momentum. When momentum is high, the moving average becomes more responsive to price changes; when momentum is low, it becomes smoother.
- Bollinger Bands Application: Calculates standard deviation of the VIDYA values and creates upper and lower bands around the adaptive moving average using a specified deviation multiplier.
The VIDYA algorithm dynamically adjusts its smoothing factor based on the CMO value, making it more responsive during trending markets and smoother during sideways conditions. This adaptive behavior helps reduce false signals while maintaining sensitivity to genuine price movements.
Parameters
The indicator accepts the following parameters:
- Period (default: 9) – Base period for VIDYA calculation and smoothing factor
- CMOPeriod (default: 14) – Period for Chande Momentum Oscillator calculation
- Deviation (default: 2) – Standard deviation multiplier for band calculation around VIDYA
Outputs
The indicator produces two outputs:
- Upper (Red) – Upper volatility band above VIDYA line
- Lower (Green) – Lower volatility band below VIDYA line
Implementation Details
The indicator calculates the Chande Momentum Oscillator (CMO) using:
CMO = 100 × ((UpMove - DownMove) / (UpMove + DownMove))
Where:
- UpMove = Sum of positive price changes over CMOPeriod
- DownMove = Sum of absolute negative price changes over CMOPeriod
The VIDYA calculation uses an adaptive smoothing factor:
Alpha = |CMO| / 100 × K K = 2 / (Period + 1) VIDYA = PreviousVIDYA + Alpha × (Price - PreviousVIDYA)
The Bollinger Bands are calculated as:
- Upper Band = VIDYA + (Deviation × StandardDeviation)
- Lower Band = VIDYA – (Deviation × StandardDeviation)
Parameter Sets
Eight optimized parameter sets are included:
- Fast Short CMO: Period=9, CMOPeriod=9, Deviation=2
- Balanced Short CMO: Period=12, CMOPeriod=9, Deviation=2
- Standard Short CMO: Period=20, CMOPeriod=9, Deviation=2
- Long Short CMO: Period=50, CMOPeriod=9, Deviation=2
- Fast Standard CMO: Period=9, CMOPeriod=14, Deviation=2
- Balanced Standard CMO: Period=12, CMOPeriod=14, Deviation=2
- Standard: Period=20, CMOPeriod=14, Deviation=2
- Long Standard CMO: Period=50, CMOPeriod=14, Deviation=2
Usage
The indicator can be used to:
- Identify adaptive trend direction based on VIDYA positioning and momentum-based responsiveness
- Determine dynamic support and resistance levels using the upper and lower bands
- Spot potential reversal points when price approaches or breaks through adaptive bands
- Assess market momentum and volatility simultaneously (narrow bands indicate low momentum, wide bands indicate high momentum)
- Generate entry signals when price breaks above upper band (bullish momentum) or below lower band (bearish momentum)
- Reduce false signals in sideways markets due to VIDYA’s adaptive smoothing during low momentum periods
The combination of momentum-adaptive VIDYA with volatility bands provides a more sophisticated analysis tool that automatically adjusts to market conditions, offering both adaptive trend direction and volatility context for more reliable trading decisions compared to static moving average-based indicators.
Indicator Availability:
This indicator is implemented for MT4, MT5, TradeStation, and MultiCharts.
Using Custom Blocks for Conditions:
You can easily define your own conditions in StrategyQuant X using Custom Blocks. This allows you to set up parameters such as periods or steps to fine-tune the indicator to your strategy. For more detailed information, refer to the following resources:
Importing Custom Indicators into SQX:
To import custom indicators into StrategyQuant X, follow the step-by-step instructions provided here:
Import & Export Custom Indicators and Other Snippets