OPEN-SOURCE SCRIPT
volatility 3.1

This script is an Adaptive Trend-Following System that uses the India VIX to dynamically adjust its sensitivity. Here is a concise breakdown:
1. Adaptive Volatility Bands
Instead of fixed bands, this code uses VIX-Adjusted ATR Bands.
When VIX is high (market is volatile), the bands widen to avoid "fakeouts."
When VIX is low, the bands tighten to catch moves early.
The center line is a 25-period EMA, which acts as the core trend filter.
2. Entry Logic
Bullish (BUY): Triggered when the price closes above the Upper Band, provided there isn't a sudden, extreme spike in the VIX (which usually indicates a crash).
Bearish (SELL): Triggered when the price closes below the Lower Band, as long as the VIX is trading above its own 25-EMA (confirming rising fear/downward momentum).
3. Exit & Trend Management
The trade stays active until the price crosses back over the 25-EMA in the opposite direction.
Green Background: Confirmed Bullish Trend.
Red Background: Confirmed Bearish Trend.
Gray Background: Sideways/Neutral (Wait).
4. Key Features
Multi-Asset & TF: You can select Nifty, Bank Nifty, FinNifty, or HDFC Bank and any timeframe (like 5m, 15m, or Daily) directly from the settings.
Live Dashboard: A table in the top-right corner shows the current trend status, VIX volatility level, and your specific entry price for the current signal
1. Adaptive Volatility Bands
Instead of fixed bands, this code uses VIX-Adjusted ATR Bands.
When VIX is high (market is volatile), the bands widen to avoid "fakeouts."
When VIX is low, the bands tighten to catch moves early.
The center line is a 25-period EMA, which acts as the core trend filter.
2. Entry Logic
Bullish (BUY): Triggered when the price closes above the Upper Band, provided there isn't a sudden, extreme spike in the VIX (which usually indicates a crash).
Bearish (SELL): Triggered when the price closes below the Lower Band, as long as the VIX is trading above its own 25-EMA (confirming rising fear/downward momentum).
3. Exit & Trend Management
The trade stays active until the price crosses back over the 25-EMA in the opposite direction.
Green Background: Confirmed Bullish Trend.
Red Background: Confirmed Bearish Trend.
Gray Background: Sideways/Neutral (Wait).
4. Key Features
Multi-Asset & TF: You can select Nifty, Bank Nifty, FinNifty, or HDFC Bank and any timeframe (like 5m, 15m, or Daily) directly from the settings.
Live Dashboard: A table in the top-right corner shows the current trend status, VIX volatility level, and your specific entry price for the current signal
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.