OPEN-SOURCE SCRIPT
volatilty 369

1. Multi-Asset & Custom Timeframe Selection
The script allows you to select a specific asset (NIFTY, BANKNIFTY, etc.) and a fixed timeframe (e.g., 15m, 1H, Daily) from the settings. It fetches data for that specific selection regardless of what chart you currently have open.
2. Volatility-Adaptive Bands
Instead of using fixed standard deviations, the script creates dynamic bands around a 25-period EMA.
It calculates an ATR (Average True Range).
It adjusts the width of the bands based on the India VIX.
If VIX is high relative to its 25-EMA, the bands widen to account for market noise. If VIX is low, the bands tighten.
3. Trend Filtering with VWAP & VIX
The code uses two primary filters to ensure high-quality entries:
VWAP Filter: For a Long signal, the price must be above the VWAP. For a Short signal, it must be below.
VIX Spike Protection: It prevents "Long" entries if the VIX is spiking (rising more than 0.8% above its EMA), as a rising VIX usually indicates a falling market or high risk.
4. Entry & Exit Logic
BUY Signal: Triggered when the price closes above the Upper Adaptive Band AND VWAP, provided the VIX is stable.
SELL Signal: Triggered when the price closes below the Lower Adaptive Band AND VWAP, provided the VIX is trending up.
Exit/Neutral: The trend turns "Sideways" if the price crosses back over the 25-EMA, acting as a trailing stop or trend-weakness indicator.
The script allows you to select a specific asset (NIFTY, BANKNIFTY, etc.) and a fixed timeframe (e.g., 15m, 1H, Daily) from the settings. It fetches data for that specific selection regardless of what chart you currently have open.
2. Volatility-Adaptive Bands
Instead of using fixed standard deviations, the script creates dynamic bands around a 25-period EMA.
It calculates an ATR (Average True Range).
It adjusts the width of the bands based on the India VIX.
If VIX is high relative to its 25-EMA, the bands widen to account for market noise. If VIX is low, the bands tighten.
3. Trend Filtering with VWAP & VIX
The code uses two primary filters to ensure high-quality entries:
VWAP Filter: For a Long signal, the price must be above the VWAP. For a Short signal, it must be below.
VIX Spike Protection: It prevents "Long" entries if the VIX is spiking (rising more than 0.8% above its EMA), as a rising VIX usually indicates a falling market or high risk.
4. Entry & Exit Logic
BUY Signal: Triggered when the price closes above the Upper Adaptive Band AND VWAP, provided the VIX is stable.
SELL Signal: Triggered when the price closes below the Lower Adaptive Band AND VWAP, provided the VIX is trending up.
Exit/Neutral: The trend turns "Sideways" if the price crosses back over the 25-EMA, acting as a trailing stop or trend-weakness indicator.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.