OPEN-SOURCE SCRIPT
VIX Risk Territory + VIX Z-Score | Astral Vision

VIX Risk Territory + VIX Z-Score | Astral Vision 🌠💠
This indicator plots the CBOE Volatility Index on any chart with two analytical modes: a raw VIX view that highlights when the index is in historically elevated territory, and a Z-Score normalized view that measures how statistically extreme the current VIX reading is relative to its own rolling history. The VIX measures the implied volatility of S&P 500 options over the next 30 days and is widely used as a proxy for market fear and risk appetite across all asset classes including Bitcoin, which historically peaks in volatility during the same macro stress events that drive the VIX higher.
Calculation ⚙️
The VIX is fetched from FRED on a daily timeframe. In Raw VIX mode, the index is plotted directly against a configurable overbought threshold, with a fill highlight when the VIX is above that level. The threshold default of 30 corresponds to the widely referenced boundary between normal market volatility and elevated fear regimes: VIX readings above 30 have historically coincided with financial stress events, equity drawdowns, and Bitcoin corrections.
In Z-Score mode, the VIX is normalized as: Z = (VIX - SMA(VIX, N)) / StDev(VIX, N), where N is a configurable rolling lookback window. This transforms the raw VIX level into a dimensionless measure of how far the current reading sits above or below its own historical mean in units of standard deviations. The Z-Score is more analytically useful than the raw level in two respects. First, the VIX has a secular baseline that shifts over time: a reading of 20 meant different things in 2007 versus 2017 versus 2022. The Z-Score adjusts for this drift by always measuring relative to the recent rolling distribution. Second, the Z-Score allows direct comparison of VIX extremes across different regimes: a +2σ reading is always a statistically rare event regardless of the absolute VIX level at the time.
Configurable overbought and oversold thresholds on the Z-Score identify statistically extreme fear and complacency readings. Elevated positive Z-Scores (VIX spiking far above its recent norm) have historically corresponded to capitulation events and macro bottoms. Negative Z-Scores (VIX compressed far below its norm) have historically corresponded to complacency phases that precede corrections.
Plots 📊
Inputs 🎛️
Colors 🎨
5 Astral Vision presets + custom override plus a configurable neutral color. Default: Infinito.
Purpose 🎯
Most crypto-native indicators track on-chain or market structure data without any reference to the macro fear environment. The VIX provides a cross-asset context layer: Bitcoin's largest drawdowns have almost all occurred during periods of elevated macro fear that were visible in the VIX before or during the move. Adding VIX regime context to any Bitcoin chart allows traders to distinguish between Bitcoin-specific corrections and systemic risk-off events, which typically require different responses. The Z-Score mode further improves on the standard practice of using fixed VIX thresholds by adapting the extreme zone definition to the current volatility regime of the VIX itself.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions.
This indicator plots the CBOE Volatility Index on any chart with two analytical modes: a raw VIX view that highlights when the index is in historically elevated territory, and a Z-Score normalized view that measures how statistically extreme the current VIX reading is relative to its own rolling history. The VIX measures the implied volatility of S&P 500 options over the next 30 days and is widely used as a proxy for market fear and risk appetite across all asset classes including Bitcoin, which historically peaks in volatility during the same macro stress events that drive the VIX higher.
Calculation ⚙️
The VIX is fetched from FRED on a daily timeframe. In Raw VIX mode, the index is plotted directly against a configurable overbought threshold, with a fill highlight when the VIX is above that level. The threshold default of 30 corresponds to the widely referenced boundary between normal market volatility and elevated fear regimes: VIX readings above 30 have historically coincided with financial stress events, equity drawdowns, and Bitcoin corrections.
In Z-Score mode, the VIX is normalized as: Z = (VIX - SMA(VIX, N)) / StDev(VIX, N), where N is a configurable rolling lookback window. This transforms the raw VIX level into a dimensionless measure of how far the current reading sits above or below its own historical mean in units of standard deviations. The Z-Score is more analytically useful than the raw level in two respects. First, the VIX has a secular baseline that shifts over time: a reading of 20 meant different things in 2007 versus 2017 versus 2022. The Z-Score adjusts for this drift by always measuring relative to the recent rolling distribution. Second, the Z-Score allows direct comparison of VIX extremes across different regimes: a +2σ reading is always a statistically rare event regardless of the absolute VIX level at the time.
Configurable overbought and oversold thresholds on the Z-Score identify statistically extreme fear and complacency readings. Elevated positive Z-Scores (VIX spiking far above its recent norm) have historically corresponded to capitulation events and macro bottoms. Negative Z-Scores (VIX compressed far below its norm) have historically corresponded to complacency phases that precede corrections.
Plots 📊
- Raw VIX line with overbought threshold and fill when above threshold (Raw VIX mode)
- Z-Score oscillator with overbought and oversold threshold lines and fill above the upper threshold (Z-Score mode)
- Candle coloring or background color on the price chart reflecting current VIX regime, switchable between the two display styles
Inputs 🎛️
- Mode: Raw VIX or Z-Score
- OB Threshold (Candle): raw VIX level above which fear territory is signaled
- OB Threshold (Z-Score): upper Z-Score extreme level
- OS Threshold (Z-Score): lower Z-Score extreme level
- Z-Score Length: rolling window for mean and standard deviation normalization
- Chart Visualization: switch between candle coloring and background color on the price chart
Colors 🎨
5 Astral Vision presets + custom override plus a configurable neutral color. Default: Infinito.
Purpose 🎯
Most crypto-native indicators track on-chain or market structure data without any reference to the macro fear environment. The VIX provides a cross-asset context layer: Bitcoin's largest drawdowns have almost all occurred during periods of elevated macro fear that were visible in the VIX before or during the move. Adding VIX regime context to any Bitcoin chart allows traders to distinguish between Bitcoin-specific corrections and systemic risk-off events, which typically require different responses. The Z-Score mode further improves on the standard practice of using fixed VIX thresholds by adapting the extreme zone definition to the current volatility regime of the VIX itself.
Disclaimer ⭕️
This indicator is for informational and educational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making investment decisions.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。