OPEN-SOURCE SCRIPT
Crypto Derivatives Dashboard v1

█ OVERVIEW
Crypto Derivatives Dashboard is a non-overlay indicator that analyzes futures market positioning data (Open Interest and Premium Index) to classify the current market regime and detect structural divergences between price action and derivatives flow.
It does NOT generate entry/exit signals. Instead, it provides a contextual layer to help you understand WHAT the derivatives market is doing — so you can decide whether to act on your primary strategy signals or wait.
█ WHAT IT MEASURES
1. OPEN INTEREST (OI)
• Daily OI change (%) — bars show inflow/outflow of contracts
• OI Z-Score — normalized deviation from its moving average (SMA 20)
• OI Rate of Change — momentum of OI over a configurable lookback
2. PREMIUM INDEX (Funding Proxy)
• Fetched from Binance PREMIUM tickers (hourly resolution)
• Converted to Z-Score to identify extremes:
→ Z > +2.0 = "Funding Hot" — overcrowded longs, correction risk
→ Z < -2.0 = "Funding Cold" — potential short squeeze setup
3. OI-PRICE DIVERGENCE
• Compares normalized ROC of OI vs Price
• Bearish divergence: price rises but OI doesn't follow (exhaustion)
• Bullish divergence: OI rises faster than price (accumulation)
4. REGIME CLASSIFICATION
Based on OI trend vs Price trend:
🟢 OI↑ + Price↑ = Healthy Trend (genuine demand)
🟡 OI↓ + Price↑ = Short Covering / Exhaustion (caution)
🔴 OI↑ + Price↓ = Shorts Building (avoid longs)
🟠 OI↓ + Price↓ = Long Liquidations (wait)
⚪ Neutral
5. COMPOSITE SCORE
Combines OI momentum, funding extremes, and divergence into a single number:
→ Positive = favorable environment for longs
→ Negative = unfavorable, consider waiting
6. LONG SIGNAL CHECK
A simple GO/WAIT flag: ✅ GO only when regime is healthy (🟢), funding is NOT extreme, AND no bearish divergence is active.
█ SUPPORTED ASSETS
BTC, ETH, SOL, BNB, XRP, PEPE — all via Binance Perpetuals.
Select the asset from the dropdown input. Tickers are constructed dynamically (handles PEPE → 1000PEPEUSDT automatically).
█ VISUAL COMPONENTS
• Column chart: Daily OI change % (teal = inflow, red = outflow)
• Blue line: OI Z-Score with ±2.0 reference levels
• Orange line: Premium Z-Score with configurable extreme thresholds
• Purple stepline: Divergence Score
• Background color: Regime classification (green/yellow/red/orange)
• Shape markers: Bearish/Bullish divergence triangles + Funding extreme icons
• Info Table (top-right): Real-time dashboard showing all metrics at a glance
█ ALERTS (6 CONDITIONS)
1. Regime Bearish — regime shifts to shorts building or liquidations
2. Bearish OI Divergence — price rises but OI doesn't confirm
3. Bullish OI Divergence — OI rises faster than price (accumulation)
4. Funding Hot — overcrowded longs, correction risk
5. Funding Cold — potential short squeeze
6. Derivatives GO — all conditions favorable for longs
█ INPUTS
Asset Selection: BTC / ETH / SOL / BNB / XRP / PEPE
OI Change Lookback: 14 (default)
OI SMA Length: 20 (default)
Divergence Z-Score Threshold: 1.5 (default)
Premium Z-Score Lookback: 50 (default)
Premium Extreme Thresholds: +2.0 / -2.0 (default)
Display toggles: Table, Background, Divergence markers
█ HOW TO USE IT
This indicator is designed as a VETO FILTER, not a signal generator.
Use it alongside your primary strategy:
1. Check the regime background before entering a trade
2. If 🟢 and no warnings → your strategy signals are confirmed
3. If 🔴🟠🟡 or bearish divergence → consider skipping the signal
4. Monitor funding extremes for contrarian context
5. Set alerts on regime changes to stay informed without watching the chart
█ TIMEFRAME
Optimized for Daily (D1). Works on any timeframe, but regime classification and z-scores are most meaningful on higher timeframes.
█ DATA SOURCES
• Open Interest: BINANCE:{ASSET}USDT.P_OI
• Premium Index: BINANCE:{ASSET}USDT_PREMIUM (1H resolution)
• Price: BINANCE:{ASSET}USDT.P (perpetual close)
█ LIMITATIONS
• Only Binance Perpetuals data (not aggregated across exchanges)
• Premium Index is a proxy for funding rate (not exact funding)
• Funding Rate, Long/Short Ratio, Liquidations, and Taker Buy/Sell Volume are NOT available as native TradingView tickers
• Regime classification uses smoothed trends — may lag at turning points
Crypto Derivatives Dashboard is a non-overlay indicator that analyzes futures market positioning data (Open Interest and Premium Index) to classify the current market regime and detect structural divergences between price action and derivatives flow.
It does NOT generate entry/exit signals. Instead, it provides a contextual layer to help you understand WHAT the derivatives market is doing — so you can decide whether to act on your primary strategy signals or wait.
█ WHAT IT MEASURES
1. OPEN INTEREST (OI)
• Daily OI change (%) — bars show inflow/outflow of contracts
• OI Z-Score — normalized deviation from its moving average (SMA 20)
• OI Rate of Change — momentum of OI over a configurable lookback
2. PREMIUM INDEX (Funding Proxy)
• Fetched from Binance PREMIUM tickers (hourly resolution)
• Converted to Z-Score to identify extremes:
→ Z > +2.0 = "Funding Hot" — overcrowded longs, correction risk
→ Z < -2.0 = "Funding Cold" — potential short squeeze setup
3. OI-PRICE DIVERGENCE
• Compares normalized ROC of OI vs Price
• Bearish divergence: price rises but OI doesn't follow (exhaustion)
• Bullish divergence: OI rises faster than price (accumulation)
4. REGIME CLASSIFICATION
Based on OI trend vs Price trend:
🟢 OI↑ + Price↑ = Healthy Trend (genuine demand)
🟡 OI↓ + Price↑ = Short Covering / Exhaustion (caution)
🔴 OI↑ + Price↓ = Shorts Building (avoid longs)
🟠 OI↓ + Price↓ = Long Liquidations (wait)
⚪ Neutral
5. COMPOSITE SCORE
Combines OI momentum, funding extremes, and divergence into a single number:
→ Positive = favorable environment for longs
→ Negative = unfavorable, consider waiting
6. LONG SIGNAL CHECK
A simple GO/WAIT flag: ✅ GO only when regime is healthy (🟢), funding is NOT extreme, AND no bearish divergence is active.
█ SUPPORTED ASSETS
BTC, ETH, SOL, BNB, XRP, PEPE — all via Binance Perpetuals.
Select the asset from the dropdown input. Tickers are constructed dynamically (handles PEPE → 1000PEPEUSDT automatically).
█ VISUAL COMPONENTS
• Column chart: Daily OI change % (teal = inflow, red = outflow)
• Blue line: OI Z-Score with ±2.0 reference levels
• Orange line: Premium Z-Score with configurable extreme thresholds
• Purple stepline: Divergence Score
• Background color: Regime classification (green/yellow/red/orange)
• Shape markers: Bearish/Bullish divergence triangles + Funding extreme icons
• Info Table (top-right): Real-time dashboard showing all metrics at a glance
█ ALERTS (6 CONDITIONS)
1. Regime Bearish — regime shifts to shorts building or liquidations
2. Bearish OI Divergence — price rises but OI doesn't confirm
3. Bullish OI Divergence — OI rises faster than price (accumulation)
4. Funding Hot — overcrowded longs, correction risk
5. Funding Cold — potential short squeeze
6. Derivatives GO — all conditions favorable for longs
█ INPUTS
Asset Selection: BTC / ETH / SOL / BNB / XRP / PEPE
OI Change Lookback: 14 (default)
OI SMA Length: 20 (default)
Divergence Z-Score Threshold: 1.5 (default)
Premium Z-Score Lookback: 50 (default)
Premium Extreme Thresholds: +2.0 / -2.0 (default)
Display toggles: Table, Background, Divergence markers
█ HOW TO USE IT
This indicator is designed as a VETO FILTER, not a signal generator.
Use it alongside your primary strategy:
1. Check the regime background before entering a trade
2. If 🟢 and no warnings → your strategy signals are confirmed
3. If 🔴🟠🟡 or bearish divergence → consider skipping the signal
4. Monitor funding extremes for contrarian context
5. Set alerts on regime changes to stay informed without watching the chart
█ TIMEFRAME
Optimized for Daily (D1). Works on any timeframe, but regime classification and z-scores are most meaningful on higher timeframes.
█ DATA SOURCES
• Open Interest: BINANCE:{ASSET}USDT.P_OI
• Premium Index: BINANCE:{ASSET}USDT_PREMIUM (1H resolution)
• Price: BINANCE:{ASSET}USDT.P (perpetual close)
█ LIMITATIONS
• Only Binance Perpetuals data (not aggregated across exchanges)
• Premium Index is a proxy for funding rate (not exact funding)
• Funding Rate, Long/Short Ratio, Liquidations, and Taker Buy/Sell Volume are NOT available as native TradingView tickers
• Regime classification uses smoothed trends — may lag at turning points
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.