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
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.