PROTECTED SOURCE SCRIPT
BTC OI Delta (binance, okx, bybit, htx, bitget, deribit)

📊 BTC Open Interest (OI) Delta (Binance, OKX, Bybit, HTX, Bitget, Deribit)
📝 Overview
This Pine Script indicator tracks and visualizes the changes (delta) in Bitcoin (BTC) open interest (OI) for perpetual futures across multiple major crypto exchanges: Binance, OKX, Bybit, Bitget, HTX, and Deribit. It calculates the total net delta by summing the OI delta from each exchange and displays positive (OI increase) and negative (OI decrease) deltas as separate column charts. Users can choose which exchanges to include or exclude and utilize the spike highlight feature to differentiate delta intensity with color based on user-defined thresholds.
⚡ Key Features
🌐 Multi-exchange OI delta tracking
Fetches and calculates BTC perpetual futures OI delta individually from Binance, OKX, Bybit, Bitget, HTX, and Deribit.
📈 Total net delta calculation
Sums the OI delta from all selected exchanges to represent overall market open interest changes.
🎨 Visualization
Column plots: Displays net OI increases (positive delta) and decreases (negative delta) as separate column charts for intuitive trend analysis.
Spike highlights: Changes in OI delta are color-coded according to user-defined thresholds to make significant moves easily identifiable.
⚙️ User settings
Users can select which exchanges to display, enable/disable spike highlights, and set thresholds for “strong” and “very strong” OI delta changes.
🛠 Input Settings
🔢 Calculation Method
🧮 Individual OI request
Uses request.security() to fetch OI data from each exchange.
➕ Delta calculation
Current bar OI minus previous bar OI (oi - oi[1]).
❌ Handling na values
If OI data is missing (exchange disabled or no data), the delta is treated as 0 to avoid sum errors.
🔗 Total net delta
Sums all selected exchange deltas as totalCombinedDelta.
↔️ Separate net increase/decrease
Positive (netIncreaseCombined) and negative (netDecreaseCombined) parts of total delta are split.
🎨 Color determination
getNetDeltaHighlightedColor function dynamically sets column colors based on highlightSpike and threshold settings.
🎨 Color Scheme
Highlight enabled:
📊 Usage
💹 Market sentiment analysis
Total net OI delta increase → capital inflow and position building
Total net OI delta decrease → capital outflow and position liquidation
⚖️ Position interpretation
📈 Trend confirmation
🌪 Volatility prediction
“Strong” or “very strong” spikes may indicate increased price volatility.
🏦 Exchange-specific impact
Enable/disable exchanges to analyze how each exchange’s OI changes affect the overall market.
📝 Overview
This Pine Script indicator tracks and visualizes the changes (delta) in Bitcoin (BTC) open interest (OI) for perpetual futures across multiple major crypto exchanges: Binance, OKX, Bybit, Bitget, HTX, and Deribit. It calculates the total net delta by summing the OI delta from each exchange and displays positive (OI increase) and negative (OI decrease) deltas as separate column charts. Users can choose which exchanges to include or exclude and utilize the spike highlight feature to differentiate delta intensity with color based on user-defined thresholds.
⚡ Key Features
🌐 Multi-exchange OI delta tracking
Fetches and calculates BTC perpetual futures OI delta individually from Binance, OKX, Bybit, Bitget, HTX, and Deribit.
📈 Total net delta calculation
Sums the OI delta from all selected exchanges to represent overall market open interest changes.
🎨 Visualization
Column plots: Displays net OI increases (positive delta) and decreases (negative delta) as separate column charts for intuitive trend analysis.
Spike highlights: Changes in OI delta are color-coded according to user-defined thresholds to make significant moves easily identifiable.
⚙️ User settings
Users can select which exchanges to display, enable/disable spike highlights, and set thresholds for “strong” and “very strong” OI delta changes.
🛠 Input Settings
- Show Zero Line (bool, default: true): Show a zero baseline on the chart.
- Highlight Spikes (bool, default: true): Enable color highlighting based on OI delta intensity.
- Strong Threshold (int, default: 1000): Delta value considered a “strong” change (in BTC).
- Very Strong Threshold (int, default: 2000): Delta value considered a “very strong” change (in BTC).
- Show Binance (bool, default: true): Include Binance OI delta.
- Show OKX (bool, default: true): Include OKX OI delta.
- Show Bybit (bool, default: true): Include Bybit OI delta.
- Show Bitget (bool, default: true): Include Bitget OI delta.
- Show HTX (bool, default: true): Include HTX OI delta.
- Show Deribit (bool, default: true): Include Deribit OI delta.
🔢 Calculation Method
🧮 Individual OI request
Uses request.security() to fetch OI data from each exchange.
➕ Delta calculation
Current bar OI minus previous bar OI (oi - oi[1]).
❌ Handling na values
If OI data is missing (exchange disabled or no data), the delta is treated as 0 to avoid sum errors.
🔗 Total net delta
Sums all selected exchange deltas as totalCombinedDelta.
↔️ Separate net increase/decrease
Positive (netIncreaseCombined) and negative (netDecreaseCombined) parts of total delta are split.
🎨 Color determination
getNetDeltaHighlightedColor function dynamically sets column colors based on highlightSpike and threshold settings.
🎨 Color Scheme
- Highlight disabled:
- Positive delta: teal shades
- Negative delta: red shades
Highlight enabled:
- Positive delta (normal): dark teal (#026628)
- Positive delta (strong): bright teal (#00ff95)
- Positive delta (very strong): yellow (#eeff00)
- Negative delta (normal): dark red (#6b0d0d)
- Negative delta (strong): bright red (#ff1044)
- Negative delta (very strong): pink (#ff00ea)
📊 Usage
💹 Market sentiment analysis
Total net OI delta increase → capital inflow and position building
Total net OI delta decrease → capital outflow and position liquidation
⚖️ Position interpretation
- BTC rising + positive OI delta → increasing long positions
- BTC falling + negative OI delta → decreasing long positions
- BTC falling + positive OI delta → increasing short positions
- BTC rising + negative OI delta → decreasing short positions
📈 Trend confirmation
- Sustained positive delta → bullish signal
- Sustained negative delta → bearish signal
🌪 Volatility prediction
“Strong” or “very strong” spikes may indicate increased price volatility.
🏦 Exchange-specific impact
Enable/disable exchanges to analyze how each exchange’s OI changes affect the overall market.
Skrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, anda dapat menggunakannya secara bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Crypto trader. Scalping, counter-trend trading.
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.
Skrip terproteksi
Skrip ini diterbitkan sebagai sumber tertutup. Namun, anda dapat menggunakannya secara bebas dan tanpa batasan apa pun – pelajari lebih lanjut di sini.
Crypto trader. Scalping, counter-trend trading.
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
암호화폐 트레이더. 스캘핑, 역추세 매매.
펀딩비 급변동 텔레그램 알림
Signal of rapid change in funding rate : t.me/binanceFRsignal
Pernyataan Penyangkalan
Informasi dan publikasi tidak dimaksudkan untuk menjadi, dan bukan merupakan saran keuangan, investasi, perdagangan, atau rekomendasi lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Persyaratan Penggunaan.