OPEN-SOURCE SCRIPT

Crypto Derivatives Dashboard v1

1 160
█ 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

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.