INVITE-ONLY SCRIPT

BTC Futures Open Interest 7-day Change | QR

54
Bitcoin Futures OI vs Price (7-Day)

What it is
This tool compares the 7-day momentum of Bitcoin perpetual futures Open Interest (OI) with the 7-day price change to classify market behavior into four intuitive regimes:
Leverage Rally (OI↑, Price↑) – positioning builds with rising price
Leveraged Sell-Off (OI↑, Price↓) – forced/short-term positioning into weakness
Deleveraging Sell-Off (OI↓, Price↓) – positions reduce while price falls
Spot Rally (OI↓, Price↑) – spot-led advance with lighter derivatives leverage
It is designed for BTC using the BINANCE:BTCUSD.P OI feed and a clean, self-contained visualization.

How it works (principle, not code)
OI Momentum: Calculates the 7-day Rate of Change (ROC) of BTC perpetual futures Open Interest.
Price Momentum: Calculates the 7-day ROC of the chart’s close.
Regime Logic: The sign of OI ROC and Price ROC determines the 4 regimes shown in the on-chart table label.
Volatility Context: A rolling standard deviation of OI ROC defines ±1σ and ±2σ bands. Bars are tinted when OI ROC exceeds ±2σ to highlight exceptional leverage shifts.
This is not a latency-sensitive microstructure model; it’s a context tool to see how derivatives positioning evolves relative to price.
Why it’s useful (originality & value)
Most OI overlays show a single line. This script adds:
a behavioral classifier (the 4 regimes) that’s immediately interpretable, and
adaptive σ-bands on OI momentum to distinguish routine leverage changes from abnormal expansions/flushes.
Together, they make it easier to read leverage cycles, spot rally quality, and identify riskier states (e.g., price up while OI surges vs. price up while OI fades).

What you see on the chart
Futures Open Interest (stepline) for BTC perpetuals (BINANCE:BTCUSD.P_OI).
OI ROC plot with zero line and ±1σ / ±2σ guides.
Bar tinting when OI ROC > +2σ (aggressive leverage build) or < −2σ (aggressive deleveraging).
Side table showing current OI ROC, Price ROC, and the regime label.
Note: If applied to a non-crypto symbol, OI will be suppressed and the script will warn that no OI data is available. It is intended for BTC.
Inputs & customization
Color mode: Choose among preset palettes to match your chart style.
(Other logic—lookbacks, σ-bands, and regime rules—are fixed to keep the reading consistent across users.)

How to use it
Confirm trends:
Leverage Rally with OI ROC above +1σ supports risk-on continuation.
Spot Rally can be constructive early in cycles, but be aware that OI can catch up quickly.
Caution in stress:
Leveraged Sell-Off often coincides with liquidation spikes and unstable conditions.
Deleveraging Sell-Off typically marks clearing phases; watch for stabilization as OI ROC returns toward 0.
Watch extremes:
±2σ moves in OI ROC are non-routine; combine with price structure, liquidations, and funding to refine decisions.
Use it as contextual confluence alongside your execution plan (levels, risk, and timeframe).

Chart-publishing guidance
Publish with a clean chart so the OI line, ROC bands, and regime label are easy to identify.
Avoid stacking unrelated indicators unless you explain why they are required to interpret the tool.

Limitations
OI feeds can vary by venue; this script uses Binance perpetual OI. Other venues may differ.
Short-term spikes (maintenance, outages, large block flows) can distort OI ROC for a few bars.
The σ-bands adapt to recent variability; regime persistence is more informative than a single spike.

Disclaimer
This script is for research and educational purposes only and is not financial advice. Trading involves risk, including loss of capital. Past performance does not predict or guarantee future results. Always validate on your timeframe and use robust risk management.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.