OPEN-SOURCE SCRIPT
volatility 3.3

The indicator is designed to identify high-probability trend reversals and breakouts by combining Price Action (EMA and ATR) with Market Volatility (India VIX). It dynamically adjusts its sensitivity based on how "nervous" the market is.
Key Components
1. Dynamic Support & Resistance (Adaptive Bands)
EMA 25: Acts as the baseline for the medium-term trend.
VIX-Adjusted ATR: Unlike standard bands, these expand or contract based on the VIX Ratio (VIX / VIX\_EMA).
If the VIX is high, the bands widen to avoid "noise."
If the VIX is low, the bands tighten to catch breakouts early.
2. VIX Filter (The Safety Switch)
VIX Spiking: If the VIX jumps suddenly (> 0.8\% above its average), the indicator blocks BUY signals. This prevents entering a trade during a "panic" move where prices often crash.
Short Confirmation: Sell signals are prioritized when VIX is higher than its average, indicating rising fear.
3. Signal Logic
BULLISH (BUY): Price closes above the Upper Band + VIX is stable (not spiking).
BEARISH (SELL): Price closes below the Lower Band + VIX is rising.
EXIT: The trend is neutralized (Sideways) if the price touches the EMA 25 line.
Visual Features
Dashboard: A real-time table showing the current trend, VIX status (High Vol vs. Stable), and your entry price.
Background Coloring: Green for Bullish zones, Red for Bearish zones, and Gray for Sideways/Neutral zones.
Asset Selection: Quickly toggle between Nifty, BankNifty, FinNifty, HDFC Bank, Reliance, and ICICI Bank.
Key Components
1. Dynamic Support & Resistance (Adaptive Bands)
EMA 25: Acts as the baseline for the medium-term trend.
VIX-Adjusted ATR: Unlike standard bands, these expand or contract based on the VIX Ratio (VIX / VIX\_EMA).
If the VIX is high, the bands widen to avoid "noise."
If the VIX is low, the bands tighten to catch breakouts early.
2. VIX Filter (The Safety Switch)
VIX Spiking: If the VIX jumps suddenly (> 0.8\% above its average), the indicator blocks BUY signals. This prevents entering a trade during a "panic" move where prices often crash.
Short Confirmation: Sell signals are prioritized when VIX is higher than its average, indicating rising fear.
3. Signal Logic
BULLISH (BUY): Price closes above the Upper Band + VIX is stable (not spiking).
BEARISH (SELL): Price closes below the Lower Band + VIX is rising.
EXIT: The trend is neutralized (Sideways) if the price touches the EMA 25 line.
Visual Features
Dashboard: A real-time table showing the current trend, VIX status (High Vol vs. Stable), and your entry price.
Background Coloring: Green for Bullish zones, Red for Bearish zones, and Gray for Sideways/Neutral zones.
Asset Selection: Quickly toggle between Nifty, BankNifty, FinNifty, HDFC Bank, Reliance, and ICICI Bank.
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.