OPEN-SOURCE SCRIPT
RSI Bitcoin vs Metals and S&P500 | Astral Vision

RSI Bitcoin vs Metals and S&P500 | Astral Vision 🌠💠
Bitcoin's relative strength against traditional macro assets (gold, silver, and the S&P 500) reveals where BTC stands in the broader capital rotation cycle.
When BTC is outperforming these benchmarks on a sustained basis, it signals risk-on momentum and capital flowing into the hardest assets.
When it underperforms, capital is rotating back toward traditional safe havens or equities, often preceding or confirming broader BTC weakness.
This indicator applies RSI to the BTC/Gold, BTC/Silver, and BTC/SPX ratios, measuring whether Bitcoin is overbought or oversold relative to each benchmark independently or as a blended average.
Two modes offer different analytical lenses:
"Extremes" identifies statistical RSI turning points against user-defined thresholds, while "Trend" tracks whether Bitcoin's relative strength is above or below the 50 midline after EMA smoothing.
Calculation ⚙️
`RSI(BTC/Gold, length)`, `RSI(BTC/Silver, length)`, `RSI(BTC/SPX, length)` — each computed on the price ratio directly, on daily or weekly timeframe.
`Average = mean(RSI_Gold, RSI_Silver, RSI_SPX)`
In Trend mode, an EMA of configurable length is applied to each RSI before plotting and threshold evaluation. The active signal is whichever of the four options (Average, Gold, Silver, SPX) is selected, and drives all coloring, fills, and overlay output.
Plots 📊
Inputs 🎛️
Colors 🎨
5 Astral Vision presets + custom override. Default: Hermes. Positive color activates at oversold extremes and above-50 trend; negative color activates at overbought extremes and below-50 trend.
Purpose 🎯
Standalone RSI on BTC price measures momentum in absolute terms, blind to how Bitcoin is performing relative to the macro environment surrounding it.
A BTC rally that lags gold and equities carries very different implications than one that leads them but a standard RSI cannot distinguish the two.
This indicator reframes the question entirely: instead of asking whether BTC is overbought or oversold in isolation, it asks whether BTC is overbought or oversold relative to the assets it competes with for capital.
The Average signal blends all three benchmarks into a single composite read, reducing the noise of any single ratio. The selectable timeframe and dual-mode structure let traders use the same indicator for both tactical entry timing (Extremes, Daily) and macro trend positioning (Trend, Weekly) without switching tools.
Disclaimer ⭕️
It is not financial advice, not an investment recommendation, and not affiliated with any financial institution, research firm, or organization of any kind. All content is provided for educational and informational purposes only. Always conduct your own research before making any financial decision.
Bitcoin's relative strength against traditional macro assets (gold, silver, and the S&P 500) reveals where BTC stands in the broader capital rotation cycle.
When BTC is outperforming these benchmarks on a sustained basis, it signals risk-on momentum and capital flowing into the hardest assets.
When it underperforms, capital is rotating back toward traditional safe havens or equities, often preceding or confirming broader BTC weakness.
This indicator applies RSI to the BTC/Gold, BTC/Silver, and BTC/SPX ratios, measuring whether Bitcoin is overbought or oversold relative to each benchmark independently or as a blended average.
Two modes offer different analytical lenses:
"Extremes" identifies statistical RSI turning points against user-defined thresholds, while "Trend" tracks whether Bitcoin's relative strength is above or below the 50 midline after EMA smoothing.
Calculation ⚙️
`RSI(BTC/Gold, length)`, `RSI(BTC/Silver, length)`, `RSI(BTC/SPX, length)` — each computed on the price ratio directly, on daily or weekly timeframe.
`Average = mean(RSI_Gold, RSI_Silver, RSI_SPX)`
In Trend mode, an EMA of configurable length is applied to each RSI before plotting and threshold evaluation. The active signal is whichever of the four options (Average, Gold, Silver, SPX) is selected, and drives all coloring, fills, and overlay output.
Plots 📊
- Active RSI or EMA-smoothed RSI line in the panel, colored by regime
- Overbought and oversold threshold lines in Extremes mode
- 50 midline in Trend mode
- Fill between the active signal and the breached threshold in Extremes mode
- Fill between the active signal and the 50 midline in Trend mode (positive above, negative below)
- Background highlight on the price chart in Extremes mode when a threshold is breached (Background Color visualization)
- Candle coloring on the price chart by active regime (Plot Candle visualization, always active in Trend mode)
Inputs 🎛️
- `Mode` : Extremes (threshold-based signals) or Trend (50-line momentum read)
- `Timeframe`: Daily or Weekly resolution for all ratio RSI calculations
- `Signal`: selects the active signal: Average, Gold, Silver, or SPX
- `Visualization` : Background Color or Plot Candle for price chart overlay
- `RSI Length`: period for all RSI calculations (default 20)
- `Overbought Level`: upper threshold in Extremes mode (default 75)
- `Oversold Level`: lower threshold in Extremes mode (default 32)
- `EMA Length (Trend Mode)`: smoothing period applied to RSI in Trend mode (default 10)
Colors 🎨
5 Astral Vision presets + custom override. Default: Hermes. Positive color activates at oversold extremes and above-50 trend; negative color activates at overbought extremes and below-50 trend.
Purpose 🎯
Standalone RSI on BTC price measures momentum in absolute terms, blind to how Bitcoin is performing relative to the macro environment surrounding it.
A BTC rally that lags gold and equities carries very different implications than one that leads them but a standard RSI cannot distinguish the two.
This indicator reframes the question entirely: instead of asking whether BTC is overbought or oversold in isolation, it asks whether BTC is overbought or oversold relative to the assets it competes with for capital.
The Average signal blends all three benchmarks into a single composite read, reducing the noise of any single ratio. The selectable timeframe and dual-mode structure let traders use the same indicator for both tactical entry timing (Extremes, Daily) and macro trend positioning (Trend, Weekly) without switching tools.
Disclaimer ⭕️
It is not financial advice, not an investment recommendation, and not affiliated with any financial institution, research firm, or organization of any kind. All content is provided for educational and informational purposes only. Always conduct your own research before making any financial decision.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.