OPEN-SOURCE SCRIPT
Bitcoin Relative Strength: BTC vs Any Asset [Customizable]

# Bitcoin Relative Strength: BTC vs Any Asset [Customizable]
## 📖 Description
**Compare Bitcoin's performance against ANY asset on TradingView** — S&P 500, Nasdaq, Gold, DXY, Ethereum, or any other ticker of your choice.
This indicator calculates and plots the **BTC / Asset ratio**, showing how many units of the chosen comparison asset one Bitcoin is worth. A rising ratio means Bitcoin is outperforming the selected asset; a falling ratio means it is underperforming.
### 🔑 Key Features
- **BTC vs Any Asset** — select any TradingView ticker as the comparison asset (SPX, NDX, GOLD, DXY, ETH, and more)
- **Dual Moving Averages** — EMA / SMA / WMA / VWMA / RMA with customizable lengths to identify trend direction
- **Bollinger Bands** — detect volatility compression and breakout zones on the ratio
- **RSI of Ratio** — identify overbought / oversold conditions in relative strength
- **Percentage Change** — adjustable lookback period (1–365 days) to quantify recent momentum
- **Trend Coloring** — dynamic bullish / bearish / neutral coloring based on ratio vs MA
- **Fill Zones** — optional fill between the ratio line and MA for easy visual trend spotting
- **Info Table** — real-time data panel showing ratio, individual prices, % change, trend, and MA values
- **Built-in Alerts** — MA crossovers, Golden / Death crosses, Bollinger breakouts, and RSI extremes
- **Fully Customizable** — colors, line widths, transparency, table position, text size, and more
### 📊 How to Use
1. **Add the indicator** to any chart.
2. Open **Settings → Data Sources** and choose your preferred Bitcoin ticker (e.g., BINANCE:BTCUSD) and comparison asset (e.g., SP:SPX, TVC:GOLD, FOREXCOM:DXY).
3. Enable optional overlays: Moving Averages, Bollinger Bands, RSI, or the Info Table.
4. Set alerts for key events like MA crossovers or Bollinger breakouts.
### 💡 Interpretation
| Ratio Direction | Meaning |
|---|---|
| 📈 Rising | Bitcoin outperforms the comparison asset |
| 📉 Falling | Bitcoin underperforms the comparison asset |
| ▲ Above MA | Bullish relative trend |
| ▼ Below MA | Bearish relative trend |
| Golden Cross (MA1 × MA2) | Long-term bullish shift |
| Death Cross (MA1 × MA2) | Long-term bearish shift |
### ⚠️ Disclaimer
This indicator is for **educational and informational purposes only**. It does not constitute financial advice. Always do your own research before making investment decisions.
**Indicator by:** iCD_creator
**Version:** 1.0
**Pine Script™ Version:** 6
---
Updates & Support
For questions, suggestions, or bug reports, please comment below or message the author.
**Like this indicator? Leave a 👍 and share your feedback!**
---
**#Bitcoin #BTC #RelativeStrength #BTCRatio #BTCvsSPX #BTCvsGold #BTCvsDXY #BTCvsETH #CryptoAnalysis #TechnicalAnalysis #TradingView #PineScript #Cryptocurrency #BitcoinDominance #CryptoIndicator #BTCStrength #MacroAnalysis #RatioChart #BitcoinVs #IntermarketAnalysis #CryptoTrading #BTCTrend #BTCSentiment #BitcoinPerformance #AltcoinRatio**
## 📖 Description
**Compare Bitcoin's performance against ANY asset on TradingView** — S&P 500, Nasdaq, Gold, DXY, Ethereum, or any other ticker of your choice.
This indicator calculates and plots the **BTC / Asset ratio**, showing how many units of the chosen comparison asset one Bitcoin is worth. A rising ratio means Bitcoin is outperforming the selected asset; a falling ratio means it is underperforming.
### 🔑 Key Features
- **BTC vs Any Asset** — select any TradingView ticker as the comparison asset (SPX, NDX, GOLD, DXY, ETH, and more)
- **Dual Moving Averages** — EMA / SMA / WMA / VWMA / RMA with customizable lengths to identify trend direction
- **Bollinger Bands** — detect volatility compression and breakout zones on the ratio
- **RSI of Ratio** — identify overbought / oversold conditions in relative strength
- **Percentage Change** — adjustable lookback period (1–365 days) to quantify recent momentum
- **Trend Coloring** — dynamic bullish / bearish / neutral coloring based on ratio vs MA
- **Fill Zones** — optional fill between the ratio line and MA for easy visual trend spotting
- **Info Table** — real-time data panel showing ratio, individual prices, % change, trend, and MA values
- **Built-in Alerts** — MA crossovers, Golden / Death crosses, Bollinger breakouts, and RSI extremes
- **Fully Customizable** — colors, line widths, transparency, table position, text size, and more
### 📊 How to Use
1. **Add the indicator** to any chart.
2. Open **Settings → Data Sources** and choose your preferred Bitcoin ticker (e.g., BINANCE:BTCUSD) and comparison asset (e.g., SP:SPX, TVC:GOLD, FOREXCOM:DXY).
3. Enable optional overlays: Moving Averages, Bollinger Bands, RSI, or the Info Table.
4. Set alerts for key events like MA crossovers or Bollinger breakouts.
### 💡 Interpretation
| Ratio Direction | Meaning |
|---|---|
| 📈 Rising | Bitcoin outperforms the comparison asset |
| 📉 Falling | Bitcoin underperforms the comparison asset |
| ▲ Above MA | Bullish relative trend |
| ▼ Below MA | Bearish relative trend |
| Golden Cross (MA1 × MA2) | Long-term bullish shift |
| Death Cross (MA1 × MA2) | Long-term bearish shift |
### ⚠️ Disclaimer
This indicator is for **educational and informational purposes only**. It does not constitute financial advice. Always do your own research before making investment decisions.
**Indicator by:** iCD_creator
**Version:** 1.0
**Pine Script™ Version:** 6
---
Updates & Support
For questions, suggestions, or bug reports, please comment below or message the author.
**Like this indicator? Leave a 👍 and share your feedback!**
---
**#Bitcoin #BTC #RelativeStrength #BTCRatio #BTCvsSPX #BTCvsGold #BTCvsDXY #BTCvsETH #CryptoAnalysis #TechnicalAnalysis #TradingView #PineScript #Cryptocurrency #BitcoinDominance #CryptoIndicator #BTCStrength #MacroAnalysis #RatioChart #BitcoinVs #IntermarketAnalysis #CryptoTrading #BTCTrend #BTCSentiment #BitcoinPerformance #AltcoinRatio**
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.