OPEN-SOURCE SCRIPT
4 diffs (CB & IBIT Premium)

📊 Script Name: 4 diffs (CB & IBIT Premium)
Version: Pine Script® v6
Overlay: Yes (table displayed on chart)
🧠 What it Does:
This script tracks four important Bitcoin price differentials to monitor spot/perpetual/futures price inefficiencies and ETF premium/discounts, and displays them in a live table on the chart. It helps traders identify arbitrage opportunities or institutional pricing signals.
📈 Displayed Metrics:
Coinbase Premium
→ Difference between Coinbase spot and Binance spot prices.
→ Use case: US vs. offshore spot market divergence.
Coinbase Spot vs Binance Perpetual
→ Difference between Coinbase spot and Binance perpetual price.
→ Use case: Spot-perp basis, often used for funding rate insights or market stress.
Bybit vs Binance Perpetual
→ Difference between Bybit perp and Binance perp price.
→ Use case: Compare derivative pricing across major offshore exchanges.
IBIT Premium (CME vs ETF-implied)
→ Compares CME futures price vs. IBIT’s implied spot BTC value
→ IBIT implied BTC = IBIT ETF price ÷ (BTC held / shares outstanding)
→ Use case: Gauge institutional premium/discount and ETF arbitrage clues.
🛠️ Customization:
Text color of the table is adjustable via the input setting.
📌 Visual Output:
A fixed 2×4 table appears in the top-right corner of the chart.
Each row shows a label and the live price difference in USD.
Version: Pine Script® v6
Overlay: Yes (table displayed on chart)
🧠 What it Does:
This script tracks four important Bitcoin price differentials to monitor spot/perpetual/futures price inefficiencies and ETF premium/discounts, and displays them in a live table on the chart. It helps traders identify arbitrage opportunities or institutional pricing signals.
📈 Displayed Metrics:
Coinbase Premium
→ Difference between Coinbase spot and Binance spot prices.
→ Use case: US vs. offshore spot market divergence.
Coinbase Spot vs Binance Perpetual
→ Difference between Coinbase spot and Binance perpetual price.
→ Use case: Spot-perp basis, often used for funding rate insights or market stress.
Bybit vs Binance Perpetual
→ Difference between Bybit perp and Binance perp price.
→ Use case: Compare derivative pricing across major offshore exchanges.
IBIT Premium (CME vs ETF-implied)
→ Compares CME futures price vs. IBIT’s implied spot BTC value
→ IBIT implied BTC = IBIT ETF price ÷ (BTC held / shares outstanding)
→ Use case: Gauge institutional premium/discount and ETF arbitrage clues.
🛠️ Customization:
Text color of the table is adjustable via the input setting.
📌 Visual Output:
A fixed 2×4 table appears in the top-right corner of the chart.
Each row shows a label and the live price difference in USD.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。