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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
My premium indicators are available on Whop:
whop.com/astralvision
Astral Vision 🌠💠
whop.com/astralvision
Astral Vision 🌠💠
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.