OPEN-SOURCE SCRIPT
Bitcoin cme gap indicators, BINANCE vs CME exchanges premium gap

# CME BTC Premium Indicator Documentation
## 1. Overview
Indicator Name: CME BTC Premium
Platform: TradingView (Pine Script v6)
Type: Premium / Gap Analysis
Purpose:
* Visualize the CME BTC futures premium/discount relative to Binance BTCUSDT spot price.
* Detect gap-up or gap-down events on the daily chart.
* Assess short-term market sentiment and potential volatility through price discrepancies.
## 2. Key Features
1. CME Premium Calculation
* Formula:
CME Premium(%) = ((CME Price - Binance Price) / Binance Price) X 100
* Positive premium: CME futures are higher than spot → Color: Blue
* Negative premium: CME futures are lower than spot → Color: Purple
2. Premium Visualization Options
* `Column` (default)
* `Line`
3. Daily Gap Detection (Daily Chart Only)
* Gap Up: CME open > previous high × 1.0001 (≥ 0.01%)
* Gap Down: CME open < previous low × 0.9999 (≤ 0.01%)
* Visualization:
* Bar Color:
* Gap Up → Yellow (semi-transparent)
* Gap Down → Blue (semi-transparent)
* Background Color:
* Gap Up → Yellow (semi-transparent)
* Gap Down → Blue (semi-transparent)
4. Label Display
* If `Show CME Label` is enabled, the last bar displays a premium percentage label.
* Label color matches premium color; text color: Black.
* Style: `style_label_upper_left`, Size: `small`.
## 3. User Inputs
| Option Name | Description | Type / Default |
| -------------- | ------------------------- | --------------------------------------- |
| Show CME Label | Display CME premium label | Boolean / true |
| CME Plot Type | CME premium chart style | String / Column (Options: Column, Line) |
## 4. Data Sources
| Data Item | Symbol | Description |
| ------------- | ---------------- | ----------------------------- |
| Binance Price | BINANCE\:BTCUSDT | Spot BTC price |
| CME Price | CME\:BTC1! | CME BTC futures closing price |
| CME Open | CME\:BTC1! | CME BTC futures open price |
| CME Low | CME\:BTC1! | CME BTC futures low price |
| CME High | CME\:BTC1! | CME BTC futures high price |
## 5. Chart Display
1. Premium Column/Line
* Displays the CME premium percentage in real-time.
* Color: Premium ≥ 0 → Blue, Premium < 0 → Purple
2. Zero Line
* Indicates CME futures are at parity with spot for quick visual reference.
3. Gap Highlight
* Applied only on daily charts.
* Gap-up or gap-down is highlighted using bar and background colors.
4. Label
* Shows the latest CME premium percentage for quick monitoring.
## 6. Use Cases
* Analyze spot-futures premium to gauge CME market sentiment.
* Identify short-term volatility and potential trend reversals through daily gaps.
* Combine premium and gap analysis to support altcoin trend analysis and position strategy.
## 7. Limitations
* This indicator does not provide investment advice or trading recommendations; it is for informational purposes only.
* Data delays, API restrictions, or exchange differences may result in calculation discrepancies.
* Gap detection is meaningful only on daily charts; other timeframes may not provide valid signals.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Crypto trader. Scalping, counter-trend trading.
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김프 모니터링, 선물 시장 대시보드
Real-time premium gap, Futures dashboard : bigtaker.com
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김프 모니터링, 선물 시장 대시보드
Real-time premium gap, Futures dashboard : bigtaker.com
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Crypto trader. Scalping, counter-trend trading.
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김프 모니터링, 선물 시장 대시보드
Real-time premium gap, Futures dashboard : bigtaker.com
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
실시간 김프 모니터링, 선물 시장 대시보드
Real-time premium gap, Futures dashboard : bigtaker.com
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.