PROTECTED SOURCE SCRIPT
Bitcoin Global Premium Index (Coinbase + Korea)

This indicator is designed to analyze regional investor sentiment and capital flow, by comparing the price premium of Bitcoin on two major regional exchanges:
Coinbase (USA) – representing North American demand.
Upbit (Korea) – representing South Korean retail and institutional sentiment.
It calculates how much higher or lower BTC is trading on those exchanges compared to the global reference price (Binance), and shows you who is leading the market sentiment.
🧠 Core Idea:
When a specific region is paying more for BTC than the global average, it indicates strong local demand, often driven by investor emotion (FOMO) or institutional activity.
🧮 How the Indicator Works:
✅ 1. Price Inputs:
Reference Price: Binance BTC/USDT (used as global baseline).
Coinbase Price: BTC/USD from Coinbase.
Korea Price: BTC/KRW from Upbit, converted to USD using your manual KRW/USD rate.
✅ 2. Premium Calculation:
For both Coinbase and Korea:
text
Copy
Edit
Premium (%) = ((Local Price - Global Price) / Global Price) * 100
This shows how much more (or less) BTC costs in each region.
✅ 3. Smoothing:
Both premium values are smoothed using a Simple Moving Average (default 20-period) to reduce noise.
🎨 Visual Components on the Chart:
Element Description
Orange Line Coinbase Premium – how much Americans are overpaying or underpaying.
Teal Line Korea Premium – how much Koreans are overpaying or underpaying.
Green Background USA (Coinbase) is leading the market sentiment.
Blue Background Korea (Upbit) is leading the market sentiment.
Gray Line at 0% Neutral level – no premium.
Dashed Lines Thresholds to detect meaningful deviations (e.g., +0.5%, -0.5%).
📈 How to Use It:
🟢 When Coinbase Premium > Korea Premium and > Threshold:
Market is being driven by U.S. buyers.
Often indicates institutional entry or strong bullish sentiment from the West.
May suggest a long-term bullish trend forming.
🔵 When Korea Premium > Coinbase Premium and > Threshold:
Market is being driven by Korean retail or whales.
Can indicate local FOMO or speculative mania.
Historically, high Korean premium has preceded market tops.
🛑 When both premiums fall below 0%:
Market is cooling down or experiencing capital outflow.
May signal incoming correction.
⚙️ Customizable Inputs:
krwUsdRate: Manually adjust the exchange rate for accuracy (default: 1350).
maLen: Adjust the smoothing period to reduce noise or respond faster.
threshold: Define what is considered a "significant" premium or discount.
Coinbase (USA) – representing North American demand.
Upbit (Korea) – representing South Korean retail and institutional sentiment.
It calculates how much higher or lower BTC is trading on those exchanges compared to the global reference price (Binance), and shows you who is leading the market sentiment.
🧠 Core Idea:
When a specific region is paying more for BTC than the global average, it indicates strong local demand, often driven by investor emotion (FOMO) or institutional activity.
🧮 How the Indicator Works:
✅ 1. Price Inputs:
Reference Price: Binance BTC/USDT (used as global baseline).
Coinbase Price: BTC/USD from Coinbase.
Korea Price: BTC/KRW from Upbit, converted to USD using your manual KRW/USD rate.
✅ 2. Premium Calculation:
For both Coinbase and Korea:
text
Copy
Edit
Premium (%) = ((Local Price - Global Price) / Global Price) * 100
This shows how much more (or less) BTC costs in each region.
✅ 3. Smoothing:
Both premium values are smoothed using a Simple Moving Average (default 20-period) to reduce noise.
🎨 Visual Components on the Chart:
Element Description
Orange Line Coinbase Premium – how much Americans are overpaying or underpaying.
Teal Line Korea Premium – how much Koreans are overpaying or underpaying.
Green Background USA (Coinbase) is leading the market sentiment.
Blue Background Korea (Upbit) is leading the market sentiment.
Gray Line at 0% Neutral level – no premium.
Dashed Lines Thresholds to detect meaningful deviations (e.g., +0.5%, -0.5%).
📈 How to Use It:
🟢 When Coinbase Premium > Korea Premium and > Threshold:
Market is being driven by U.S. buyers.
Often indicates institutional entry or strong bullish sentiment from the West.
May suggest a long-term bullish trend forming.
🔵 When Korea Premium > Coinbase Premium and > Threshold:
Market is being driven by Korean retail or whales.
Can indicate local FOMO or speculative mania.
Historically, high Korean premium has preceded market tops.
🛑 When both premiums fall below 0%:
Market is cooling down or experiencing capital outflow.
May signal incoming correction.
⚙️ Customizable Inputs:
krwUsdRate: Manually adjust the exchange rate for accuracy (default: 1350).
maLen: Adjust the smoothing period to reduce noise or respond faster.
threshold: Define what is considered a "significant" premium or discount.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script protetto
Questo script è pubblicato come codice protetto. Tuttavia, è possibile utilizzarlo liberamente e senza alcuna limitazione – per saperne di più clicca qui.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.