Open Interest Suite [QuantAlgo]🟢 Overview
The Open Interest (OI) Suite is a comprehensive OI visualization and analysis tool built specifically for crypto perpetual futures traders. It reads open interest data directly from TradingView-supported exchanges, giving you a way to monitor how many active contracts are currently open in the market. Whether you are tracking a single exchange or aggregating OI across venues like Binance, Bybit, Bitget, Coinbase, Kraken, HTX, BitMEX, and OKX, this indicator is one of the most powerful contextual tools available, allowing traders to quickly gauge overall perpetual futures market positioning.
🟢 What is Open Interest?
Open interest (OI) is the total number of live contracts between buyers and sellers at any given moment. Every long is matched to a short at a 1:1 ratio, so OI gives you a strong sense of how much capital and how many positions are currently committed to the market. Rising OI suggests new money and new positions are entering. Falling OI suggests positions are being closed or liquidated. When combined with price action, OI becomes one of the most valuable lenses available for understanding what is likely happening beneath the surface of price movement in perpetual markets.
🟢 How It Works
The indicator operates in two distinct modes. In Single (Chart) mode, it automatically reads open interest from whichever supported exchange and perpetual contract you are currently viewing, requiring no manual configuration. In Aggregated mode, it fetches OI from some of the highest-volume exchanges in crypto, for example, Binance, Bybit, Bitget, Coinbase, Kraken, HTX, BitMEX, and OKX, combines them into a single composite total, and gives you a cross-market view of positioning that no individual exchange feed can provide on its own. For each exchange in Aggregated mode, OI is fetched across both USDT and USDC perpetual pairs where applicable, then converted to a unified measure before summing. More exchanges will be added as their data becomes available on TradingView.
The Measure setting controls how OI values are expressed. In Coins mode, values are kept in their native unit, which may be more useful when you want to observe raw contract volume independent of price fluctuations. In Dollars mode, coin quantities are multiplied by the current bar price to convert values into USD, which is the standard way most traders and data providers report OI and tends to make cross-asset comparisons more intuitive. For exchanges that report natively in USD, the conversion is handled in reverse when Coins mode is active.
🟢 Key Features
▶ View Modes
The indicator offers four ways to visualize OI, each suited to a different analytical purpose.
1. Candles: Renders OI as full OHLC candlesticks, displaying open, high, low, and close OI for every bar. This is the richest view for studying OI structure, trends, compression, and expansion over time. You can watch OI build or unwind bar by bar similarly to how you read price action, which may help with spotting periods of aggressive position-building or rapid deleverage.
2. Lines: Renders OI as a single continuous line using the close value of each bar. Cleaner and less visually demanding than candles, this mode works well for maintaining OI context alongside other indicators without crowding the chart.
3. Change: Displays the bar-over-bar absolute difference in OI as a histogram. Positive bars indicate net new positions were likely opened. Negative bars suggest net positions were closed or liquidated. This mode can help identify the bars where positioning shifted most dramatically, which often corresponds to high-conviction entries, forced liquidations, or possible trend exhaustion.
4. Change (%): The same histogram expressed as a percentage of the prior bar OI value. This normalises the signal across different asset sizes and OI magnitudes, which could make it easier to compare positioning dynamics between a large-cap asset and a smaller altcoin.
▶ Aggregated Mode and Exchange Selection
In Aggregated mode, each of the eight supported exchanges can be toggled on or off independently. This flexibility allows several useful configurations beyond a simple total. You can enable only one exchange to track that specific venue regardless of which chart you are currently viewing. You can also add the indicator to your layout multiple times with a different single exchange selected each time, letting you compare individual exchange OI side by side on the same chart.
▶ Color Presets
Five built-in color presets (Classic, Aqua, Cosmic, Cyber, Neon) allow you to match the indicator's appearance to your chart setup with a single click. A Custom preset exposes individual color pickers for bull, bear, and line colors, giving full control over every visual element including candle bodies, wicks, borders, histogram columns, and the line overlay.
▶ Unsupported Exchange Warning
When Single (Chart) mode is active and the current exchange does not provide open interest data on TradingView, the indicator displays a warning label on the chart identifying the unsupported exchange and listing supported alternatives.
🟢 Price + OI Interpretation
Reading OI in isolation is only part of the picture. More meaningful analysis tends to come from combining OI direction with price action and, where available, volume data, along with other trend-following or mean-reversion indicators.
Examples:
1. Price Up + OI Up: New capital is likely entering on the long side. This could indicate bullish trend continuation, with fresh positioning supporting the move rather than just short covering. The stronger the OI growth relative to price movement, the higher the probability that the trend has genuine participation behind it.
2. Price Down + OI Up: New shorts are probably being added aggressively. Bearish momentum may be building through fresh positioning, which tends to be a more sustained signal than a move driven purely by long liquidations.
3. Price Down + OI Down: Longs are likely closing or being liquidated. The selling pressure in this scenario is coming from position unwinds rather than new short entries, which could sometimes suggest exhaustion near a local low rather than fresh trend initiation.
4. Price Up + OI Down: Shorts are probably closing or being squeezed out. This is the likely mechanics of a short squeeze: buyers overwhelm sellers, underwater shorts cover, and the resulting buy pressure may accelerate the move higher. This pattern tends to produce some of the fastest and sharpest price moves seen in crypto perpetual markets.
It is worth noting that for every short there is a long. When OI increases during a downtrend, it does not necessarily mean only shorts are entering. Longs are participating too, often more passively through limit orders. Cumulative Volume Delta (CVD) can help distinguish which side is more likely driving the flow, since it measures aggressive buying versus aggressive selling pressure within each bar.
🟢 Important Notes
1. This indicator is designed exclusively for crypto perpetual futures and will not produce output on spot tickers, equity symbols, or any instrument without a corresponding OI feed on TradingView. In Single (Chart) mode, if the exchange you are viewing is not among the currently supported venues (Binance, Bybit, Bitget, Coinbase, Kraken, HTX, BitMEX, and OKX), the indicator will display a warning and produce no data. Switching to a supported exchange will restore functionality. More exchanges will be added as their data becomes available on TradingView.
2. OI is most useful as a context layer rather than a standalone signal. Using it alongside price structure, volume, and order flow analysis may help you assess whether a move is likely backed by new positioning or driven by position unwinds. That distinction could have meaningful implications for how far a move extends and how quickly it might reverse. Indikator

Indikator

Indikator

Indikator

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
Indikator

Indikator

Liquidation Heatmap by RumiancevLiquidation Heatmap by Rumiancev
Overview
Liquidation Heatmap is an open-source visual map of estimated liquidation zones built from activity spikes .
When the script detects an unusually large spike, it projects liquidation levels for multiple leverage tiers and aggregates them into horizontal price “bins”. Each bin accumulates weight over time and is displayed as a color gradient:
• Brighter / hotter = higher accumulated weight
• Darker / colder = lower accumulated weight
Important: This is not an exchange liquidation feed and it does not display “real liquidation prices”. It is a proxy model designed to visualize where liquidation pressure could be clustering based on abnormal market activity.
Why BTCUSDT.P is recommended
For the most consistent and “liquidation-relevant” behavior, use a perpetual futures symbol such as BTCUSDT.P .
Perpetual markets provide Open Interest , so the script can use OI Delta (change in OI) as the spike stream. OI delta typically reflects leveraged positioning changes (build-up / flushes) more directly than spot volume.
• On perpetuals → OI data is available → spikes are usually cleaner for this model
• On spot → OI is not available → the script may fall back to volume, which can be noisier
If needed, set OI Symbol Override manually (examples are shown in the input tooltip).
How it works (logic)
1) Select a spike stream
• AUTO : uses OI Delta if available, otherwise Volume
• OI : forces OI Delta
• VOL : forces Volume only
2) Detect spike events
The script measures abnormal activity using a Z-score style approach on the absolute stream:
• Spike Lookback defines the baseline window
• Sensitivity maps to a threshold (lower = more events, higher = fewer events)
• Min bars between events optionally reduces clustering on lower timeframes
3) Project liquidation prices
For each spike event, liquidation estimates are calculated for up to three leverage tiers:
• Long liquidations are projected below the reference price
• Short liquidations are projected above the reference price
4) Bin, accumulate, and colorize
Projected levels are snapped into bins using Bin Scale (ticks) .
Bin weight is accumulated and displayed as a gradient between Low density and High density .
5) Freeze on touch
When price touches a bin (wick or close, depending on settings), the bin is frozen :
• it stops updating
• it becomes dotted / high transparency
This keeps a lightweight history of zones that have been interacted with.
How to read the map
• Bins below price often represent potential long-liquidation pressure zones
• Bins above price often represent potential short-liquidation pressure zones
• Brighter bins = more accumulated spike weight → potentially more crowded zone
• Frozen dotted bins = price already touched that zone (historical interaction)
Timeframes (recommendations)
This indicator runs on any timeframe, but density/noise changes significantly.
Best balance (recommended):
• 15m / 1H / 4H — good signal-to-noise and clean structure
Higher timeframes (cleaner, fewer zones):
• 12H / 1D — fewer events, more “macro” zones
Lower timeframes (noisier by nature):
• 1m / 3m / 5m — more spikes and more bins
To reduce clutter on low TF, consider:
• increasing Sensitivity (e.g., 14–18)
• enabling Min bars between events (e.g., 10–30)
• increasing Bin Scale (ticks) (thicker bins → fewer levels)
• enabling Keep only local range bins
Inputs (what each setting does)
Source
• Source Mode : AUTO / VOL / OI
• OI Symbol Override : manual OI source if AUTO is not suitable
Event (Spike) Filter
• Spike Lookback : baseline window for mean/stdev
• Sensitivity : lower = more events, higher = fewer events
• Use high/low for touch test : wick-based touches
• Min bars between events : reduces spike clustering
Liquidation Levels (bins)
• Reference Price : base price for projections (close/hl2/etc.)
• Leverage 1/2/3 : leverage tiers (set to 0 to disable any tier)
• Bin Scale (ticks) : bin thickness (bigger = fewer bins)
• Extend (bars) : how long active bins extend
• Max active bins per side : cap for active bins
• Dispersion (%) : splits part of the weight to the opposite side
• Keep only local range bins + Local range lookback : trims bins far from recent range
Visual
• Gradient colors, frozen transparency, legend, and debug marker
Limitations / Disclaimer
This script is provided for research and educational purposes only . It is not financial advice .
The plotted zones are estimates derived from a simplified model (spike detection + leverage projections). Results depend on symbol, exchange data availability (OI), and timeframe.
Indikator

CVD Z-Score [SolQuant]The CVD Z-Score indicator measures cumulative buying versus selling pressure, normalized as a statistical z-score, to detect volume-price divergences and accumulation/distribution phases. It displays a smoothed oscillator that highlights when volume delta reaches statistical extremes, identifies effort-versus-result efficiency, and flags potential spot accumulation setups where rising CVD coincides with flat price action and declining open interest.
█ USAGE
Reading the Z-Score Oscillator
The main line oscillates around zero. Positive values indicate net buying pressure is above its recent average; negative values indicate net selling pressure. The line is colored blue when bullish and pink when bearish. The further the line moves from zero, the more statistically significant the current volume delta is relative to its recent history. A gradient fill extends from the zero line to the oscillator, making momentum direction and strength immediately visible.
The neutral zone between +1.0 and -1.0 represents normal statistical variation. Values beyond ±1.0 indicate increasingly meaningful directional pressure. Values beyond ±2.0 are statistically extreme.
Climax Zone Warnings
When the Z-Score first crosses above +2.0 or below -2.0, a diamond marker appears on the oscillator. These climax entries indicate that buying or selling pressure has reached a statistical extreme — a condition that often precedes exhaustion or reversal. While the Z-Score remains in the extreme zone, a subtle background highlight persists as a visual reminder that conditions are overextended.
Diamonds mark only the first bar entering the extreme zone, not every bar within it. This keeps the chart clean while still flagging the transition into climax territory.
Spot Accumulation Signals
Blue circle markers appear at the bottom of the oscillator when three conditions align simultaneously:
1 — The CVD Z-Score is positive and rising (buying pressure increasing)
2 — Price action is flat (range is contained within 1.5x ATR)
3 — Open Interest is declining (futures positions are unwinding)
This combination suggests that buying is occurring in the spot market while futures traders are reducing exposure — a pattern often associated with accumulation phases before a move higher.
Dashboard
An optional dashboard displays three real-time metrics:
• Z-Score: Current value with trend arrow and extreme zone highlighting. Green background at extreme overbought, red at extreme oversold.
• Efficiency: Shows whether the current market is in a "Breakout" state (price responding to volume), "Churn" state (volume active but price stalling), or "Balanced."
• Phase: Displays the current signal state — "Accumulation" when spot accumulation conditions are met, "Climax" when the Z-Score is in an extreme zone, or "Neutral."
█ DETAILS
CVD Calculation
Cumulative Volume Delta is built bar-by-bar. Bullish bars (close > open) add their full volume to the running total. Bearish bars (close < open) subtract their full volume. Doji bars (close = open) contribute zero. The resulting cumulative line tracks the net balance of buying versus selling pressure over time.
Z-Score Normalization
The raw CVD value is normalized into a z-score by subtracting its Simple Moving Average and dividing by its Standard Deviation, both calculated over the configurable lookback period (default: 20). This transforms the CVD into a standardized measure of how far current buying/selling pressure deviates from its recent norm. An EMA of the configurable smoothing length (default: 5) is applied to reduce noise while preserving responsiveness.
Efficiency Analysis (Effort vs Result)
The efficiency metric compares price movement to CVD movement over the last 5 bars. The ratio is calculated as the absolute price change divided by the absolute CVD change, scaled for readability. High efficiency (above 5) indicates a "Breakout" — price is moving significantly relative to volume delta, suggesting genuine directional commitment. Low efficiency (below 0.5) indicates "Churn" — volume delta is active but price is not responding, which may signal absorption, distribution, or range-bound conditions.
Open Interest Integration
Open Interest data is fetched from a configurable ticker (default: BINANCE:BTCUSDT.P_OI). The change in OI is used exclusively for spot accumulation signal detection. Declining OI combined with rising CVD and flat price suggests that buying pressure is coming from the spot market rather than leveraged futures positions.
█ SETTINGS
Z-Score Settings
• Z-Score Lookback Period: SMA and Standard Deviation period for z-score normalization (default: 20). Higher values produce a smoother baseline but slower response to regime changes.
• Smoothing Length (EMA): EMA period applied to the raw z-score (default: 5). Higher values reduce noise; lower values increase sensitivity.
Data Source
• OI Ticker: Symbol for Open Interest data used in spot accumulation detection (default: BINANCE:BTCUSDT.P_OI). Change this to match the asset being analyzed.
Signals
• Show Spot Accumulation Signals: Toggle blue circle markers when CVD is rising with flat price and declining OI.
• Show Climax Zone Warnings: Toggle diamond markers and background highlights at extreme z-score levels (±2.0).
Dashboard
• Show Dashboard: Toggle the multi-metric information panel.
• Dashboard Position: Place the dashboard at any of seven screen positions.
• Dashboard Size: Choose between Tiny, Small, or Medium text sizes.
This indicator measures statistical extremes in volume delta and does not predict price direction. Accumulation signals identify a specific volume-price-OI pattern that does not guarantee a subsequent move. Climax events indicate statistical extremes that may not result in reversals. It does not constitute financial advice. Past performance does not guarantee future results.
Indikator

Aggregated Open interest + Volume DeltaAggregated Open Interest from Binance + Bybit with adaptive threshold detection, delta-based
positioning classification, and noise-killing bar coloring.
Most OI indicators show you raw data. This one filters out the noise and highlights only what matters
— significant OI events that move the market.
How It Works
The indicator aggregates Open Interest OHLC data from 4 sources:
- Binance USDT & USD perpetuals
- Bybit USDT & USD perpetuals
It then applies an adaptive SMA-based threshold to detect statistically significant OI changes. Only
bars that exceed the threshold get colored — everything else is dimmed to dark grey. This is the
signature feature: at a glance, you see only the bars that matter.
The Core Logic: Delta + OI Positioning
Most OI indicators classify bars using candle color (bullish/bearish close). This is wrong.
A candle can close bearish after a liquidity sweep above a high — but the actual volume delta is
positive (shorts buying to cover their stops). Candle color lies. Delta tells the truth.
The key insight: OI increasing = new fuel (positions that can be squeezed). OI decreasing = exits (no
new fuel, just unwinding).
Features
Display Modes
- OI Candles — OHLC candlestick chart of total aggregated OI
- OI Delta — Bar chart showing per-bar OI change (close - open, intra-bar)
Threshold-Based Bar Coloring
- Normal candles dimmed to dark grey — cuts through noise instantly
- 4-color fuel mode: bright green (Agg Longs), bright red (Agg Shorts), muted red (Rekt Longs), muted
green (Rekt Shorts)
- Simple 2-color mode also available (green = OI up, red = OI down)
- All colors fully configurable
Order Flow Detection
- Smart labels on each significant bar (AGG LONGS, AGG SHORTS, REKT LONGS, REKT SHORTS)
- Liquidation cascade detection — highlights when 2+ consecutive bars show large OI decrease (margin
cascade)
- Absorption detection — large OI increase with a small candle body signals institutional accumulation
Screener Table
- Bottom-right table showing dollar values over a configurable lookback (default 200 bars):
- Rekt Longs / Rekt Shorts
- Aggressive Longs / Aggressive Shorts
- Total aggregated OI
8 Alert Conditions
- Large OI Increase / Decrease
- Rekt Longs / Rekt Shorts
- Aggressive Longs / Aggressive Shorts
- Liquidation Cascade
- Absorption
Settings
- Threshold Multiplier (default 5.0) — higher = fewer events, lower = more sensitive
- SMA Lookback (default 300) — adaptive threshold window
- Data Sources — toggle each exchange on/off independently
- Dim Normal Bars — the signature grey-out effect (on by default)
- 4-Color Fuel Mode — positioning-aware coloring (on by default)
- OI EMA — optional moving average overlay on OI candles
Why Delta + OI > Candle Color + OI
Example: Price sweeps above a swing high (SFP), then reverses and closes bearish. Standard indicators
see "bearish candle + OI decrease" and label it "Rekt Longs." But the volume delta on that bar is
positive — shorts were buying to cover their stops above the high. The correct label is Rekt Shorts.
This indicator gets it right because it uses delta, not candle color.
Usage Tips
- Works on any crypto perpetual chart — dynamically builds symbols from syminfo.basecurrency
- Best on 5m, 15m, 1H, 4H timeframes
- Start with default settings (multiplier 5, lookback 300) then adjust to your timeframe
- Lower multiplier = more signals, higher = only the biggest events
- Combine with supply/demand zones for confluence — significant OI events at key levels are the
highest-probability setups
Created by: AghaInvst Indikator

Total Futures Volume & Open Interest (Aggregated Curve)Description
Most futures indicators only look at the front contract, but that often tells an incomplete — and sometimes misleading — story.
This indicator solves that problem by aggregating Volume and Open Interest across the entire futures curve, not just the nearest expiry.
Instead of focusing on a single contract, the script automatically scans up to 40 futures contracts ahead (roughly one year forward) for the same underlying root symbol and sums their data into a single, unified series.
🔍 Why this matters
Open Interest is about commitment, not just activity.
A drop in front-month OI can simply mean rolls, not liquidation
Rising total OI confirms new money entering the market, not just contract switching
Divergences between price and aggregated OI often signal positioning stress, exhaustion, or regime shifts
By looking at total participation across all maturities, you get a much cleaner view of:
Real capital inflows vs. mechanical rolls
Structural positioning changes
Whether volatility is driven by speculation or true exposure changes
This is especially useful during high-volatility phases, contract roll periods, and major macro moves, where front-month data alone can be deceptive.
⚙️ How it works
Automatically iterates through the last 40 futures contracts of the same root symbol starting from ~1 year ahead expiry.
Aggregates: Total Open Interest and Total Volume
Lets you choose what to display directly from the indicator settings
Fully dynamic — no manual symbol selection, no roll management
The result is a continuous, roll-agnostic view of futures participation.
🧠 How to use it
Confirm breakouts with rising aggregated OI
Detect false moves when price expands but total OI contracts
Analyze post-spike behavior to see whether moves were driven by forced liquidation or fresh positioning
Compare volatility spikes against true market engagement
Indikator

Indikator

Indikator

Session Anchored OIWAP [Arjo]The Session Anchored OIWAP (Open Interest Weighted Average Price) indicator shows you a weighted average price that uses Open Interest (OI) changes during different trading sessions . It divides the day into four clear sessions: Opening Hour , Morning Session , Mid-Day Session , and Closing Session .
For each session , it calculates a weighted average price using both market price and open interest data from futures . This line updates as the session progresses and resets when a new session starts .
You can also see optional deviation bands that you visually compare to how far the market price is moving away from the session’s weighted average. This indicator also helps you watch how Open Interest changes connect with price movements during specific market hours.
Concepts
This tool works on a few simple ideas:
Session anchoring
Each session starts fresh. The indicator resets and begins a new calculation when a new time block begins. This allows users to visually study each session independently.
Open-interest weighting
Instead of treating all price moves equally, price changes linked to higher open-interest activity have more influence on the OIWAP. This gives a weighted reflection of where the market has been trading during the session.
Averaging and smoothing
The OIWAP line blends many price data points into one smooth curve, making it easier to follow than raw price movement.
Volatility display with bands
The upper and lower bands are placed at ±0.5 standard deviation from the OIWAP line. These bands simply help you see when price stretches further away than usual from the session average.
Features
Four Independent Session Calculations: Shows separate OIWAP lines for Opening Hour (default: 09:15-10:15), Morning (10:15-11:30), Mid-Day (11:30-14:00), and Closing (14:00-15:30) sessions
Open Interest Weighting: Uses absolute OI change as the weight instead of traditional volume
Customizable Session Times: You can change the time ranges for each session to match your market or what you need
Optional Deviation Bands: You can turn ±0.5 standard deviation bands on or off around each OIWAP line
Color-Coded Sessions: Each session has its own color so you can tell them apart easily
Selective Display: You can turn individual sessions and bands on or off
Data Availability Check: Shows you a notification when Open Interest data isn't available for your symbol
Adjustable Position Timeframe: You can calculate OI changes on different timeframes (Chart, Daily, 15min, 30min, 60min, 120min)
How to use
Add this indicator to a chart of any symbol that has Open Interest data ( from futures or derivatives contracts). Once you add it, you'll see colored lines showing the OIWAP for each session you enable, along with optional deviation bands.
Adjusting Settings:
Turn individual sessions on or off using the checkboxes in the " Sessions " section
Change session colors to match your chart or what looks good to you
Turn deviation bands on or off using the " Show Bands " option in the Display settings
Change session time ranges in the " Session Times " section to match your market hours or what you want to analyze
Change the Position Timeframe if you want to see OI changes calculated on a different time period
Visual Interpretation:
Each OIWAP line shows you the OI-weighted average price for that session
The deviation bands show you how much prices spread out, weighted by OI changes
You can watch how price interacts with these levels to see where significant OI activity happened
Different sessions may show different OIWAP levels, showing you how the OI-price relationship changes throughout the trading day
Note:
This indicator needs Open Interest data to work. If OI data isn't available for your symbol, you'll see a message in the center of your chart. This indicator works only with derivatives markets like futures and options in the Indian Market where OI data is publicly available.
Conclusion
The Session Anchored OIWAP indicator is designed to support structured market observation by combining price, open interest, and session anchoring into a clear visual format. It helps users study market behavior during different parts of the day without generating trading instructions or outcomes.
Disclaimer
This indicator is for educational and visual-analysis purposes only. It does not provide trading signals , financial advice, or guaranteed outcomes . You should perform your own research and consult a licensed financial professional when needed. All trading decisions are solely the responsibility of the user.
Happy Trading
Indikator

Open Interest Weighted Average Price [Arjo]Open Interest Weighted Average Price , or OIWAP , is a simple visual indicator that shows the average price of an asset based on changes in open interest .
Instead of using trading volume like VWAP, this indicator gives more weight to prices where new futures contracts are being added or removed . This helps highlight the price levels where traders are actively building or closing positions.
The indicator shows:
A main line that represents the average price weighted by open interest changes.
Upper and lower bands (standard deviation bands) that show how far the price moves away from this average.
OIWAP is mainly useful for NSE futures markets , where open interest data is available. It helps traders visually understand where most market participation and positioning are taking place relative to price .
Concepts:
Applies statistical concepts, including weighted averaging and standard deviation, to open interest data
Uses the absolute change in open interest as a weighting factor for each price point
Creates a dynamic average that reflects where significant open interest activity has occurred during a given period
Standard deviation bands are computed from this weighted average to show the statistical spread of prices around the OIWAP line
Resets calculations based on user-selected time periods (daily, weekly, monthly, or session-based)
Allows for fresh analysis at regular intervals
Similar concept to volume-weighted average price (VWAP) indicators, but uses open interest changes as the weighting component
Features:
Weighted Average: Calculates a central line based on contract activity.
Flexible Anchors: Allows users to choose the reset period for the calculation.
Volatility Bands: Displays outer and mid-bands to visualize price stretches.
Data Check: Built-in alerts notify you if Open Interest data is missing for a symbol.
Visual Zones: Color-coded areas help identify price location at a glance.
How To Use
When you add the indicator to your chart, you will see:
A main OIWAP line — the open-interest-weighted price level
Mid-bands around the line (±0.5 standard deviations)
Outer bands farther away (±2.0 standard deviations)
Shaded background zones between these lines
You can:
Change the reset period to see how the average behaves over different time ranges
Adjust the timeframe for open-interest data
Turn mid-bands on or off
Adjust colors and styles to improve readability
Conclusion
The OIWAP indicator serves as an educational tool for visualizing the relationship between price movements and open interest activity in futures markets
Presents a weighted average price line along with statistical deviation bands
Offers a structured framework for chart analysis
Customizable settings allow users to adapt the display to their analytical preferences
Maintains focus on visual interpretation rather than directional predictions
Functions as a supplementary charting overlay that may complement other forms of technical and fundamental analysis
Disclaimer
This indicator is for educational and visual-analysis purposes only. It does not provide trading signals, financial advice, or guaranteed outcomes . You should perform your own research and consult a licensed financial professional when needed. All trading decisions are solely the responsibility of the user. Indikator

Open Interest Bubbles [BackQuant]Open Interest Bubbles
A visual OI positioning overlay that aggregates futures open interest across major venues, normalizes it into a consistent “signal strength” scale, then plots extreme events as bubbles, labels, and optional horizontal levels directly on price.
What this is for
Open interest is one of the cleanest ways to track when positioning is building, unwinding, or aggressively shifting. The problem is raw OI is noisy, exchange-specific, and hard to compare across time. This script solves that by:
- Aggregating OI across multiple exchanges.
- Letting you choose what “OI signal” you care about (raw, delta, percent versions).
- Normalizing the signal so “big events” are easy to spot.
- Plotting those events as bubbles and levels at the exact price they occurred.
You end up with a clean, fast visual map of where large positioning changes occurred, and where those events may later matter as reaction points.
────────────────────────────────────────────────────────────
Plotting types (what you can display)
Bubbles
This mode plots OI events as size-bucketed circles on the chart. Bigger bubbles represent stronger normalized events. You can tune:
- Bubble sizing by bucket (Tiny → Huge).
- Heatmap vs solid color styling.
- Signed vs unsigned coloring (positive/negative separation or magnitude-only).
Best use:
- Spotting “where something changed” at a glance.
- Identifying clusters of positioning events around key price zones.
- Seeing whether the market is repeatedly building/closing positions at similar levels.
Levels
Levels mode draws a horizontal line at the anchor price when an extreme OI event triggers. These act like “positioning memory” levels:
- They do not claim to be support/resistance by themselves.
- They highlight prices where the derivatives market clearly did something meaningful.
Best use:
- Marking potential reaction zones.
- Combining with your price action tools (structure, OBs, FVGs) to confirm whether an OI level aligns with a technical level.
- Building a “map” of where leverage likely entered or exited.
Modes available in the script:
- Off
- Bubbles
- Bubbles + Labels
- Labels Only
- Levels + Labels
────────────────────────────────────────────────────────────
Aggregated Open Interest source (multi-exchange)
This indicator builds a single aggregated OI series by requesting OI data from multiple exchanges and summing it. You can toggle exchanges on/off:
- Binance, Bybit, OKX, Bitget, Kraken, HTX, Deribit
You can also choose OI units:
- COIN , OI in base units (native sizing)
- USD , converted for a dollar-value representation
Important note:
Not every symbol has OI data on every venue. If the script cannot build an aggregated series for the symbol, it will throw an error rather than quietly plotting garbage.
────────────────────────────────────────────────────────────
OI Source, what the bubbles are measuring
You control what “signal” is normalized and plotted:
- Delta , change in aggregated OI from the prior bar.
Use when you want to highlight bursts of new positioning or sudden unwind events.
- Raw OI , the aggregated open interest level itself.
Use when you want to highlight absolute positioning build-up periods.
- Delta % , percent change in OI.
Use when you want moves normalized to the current OI regime, useful across different market eras.
- Raw OI % , percent change form of the raw series.
Use when you want relative changes rather than absolute size.
Practical guidance:
- Delta modes are best for “event detection”.
- Raw modes are better for “regime context” and whether positioning is structurally rising or fading.
────────────────────────────────────────────────────────────
Normalization (the key to making it readable)
Because OI varies massively across assets and time, the script includes multiple normalization modes to convert your chosen OI source into a comparable “strength” value.
Options:
- ZScore , deviation from a rolling mean in standard deviation units.
- StdNorm , scaled by rolling standard deviation.
- AbsZScore , absolute value version for magnitude-only mapping.
- AbsStdNorm , absolute value version for magnitude-only mapping.
- None , plots raw values (advanced users only, often too noisy visually).
Why this matters:
Normalization makes a “1.5” or “3.0” threshold mean something across different assets and timeframes, instead of being stuck to raw OI units.
────────────────────────────────────────────────────────────
Threshold system (when bubbles/levels trigger)
The plot is driven by two user thresholds:
- Base Threshold
Controls where “meaningful” events start. Raising this reduces noise and focuses on larger deviations.
- Extreme Threshold
Controls what qualifies as a top-tier event. Extreme events are what you typically want to convert into labels and levels.
You also control side filtering:
- Both , show positive and negative events.
- Positive Only , show only increases (or positive signal side depending on source).
- Negative Only , show only decreases (or negative signal side).
In practice:
- Use Base Threshold to tune chart cleanliness.
- Use Extreme Threshold to mark only the “big stuff” that tends to matter later.
────────────────────────────────────────────────────────────
Anchor Source (where the bubble/level is placed)
The indicator places bubbles, labels, and levels at a price anchor you choose:
- HL2, Close, Open, High, Low, VWAP
This is important because “where you pin the event” changes how it reads:
- Close is clean and consistent for backtesting and candle-close logic.
- High/Low can better represent where the fight occurred intrabar.
- VWAP can be useful for “fair price” anchoring in active markets.
────────────────────────────────────────────────────────────
Style system (theme, palette, signed logic)
This script is built to look good and stay readable on busy charts.
Themes
- BackQuant, Classic, Ice, Fire, Mono, Custom
Palette Mode
- Solid , one consistent color
- Heatmap , intensity increases with magnitude
- Single Color Adaptive , adapts to chart background for clarity
Side Coloring
- Signed , positive and negative events can use different ramps
- Unsigned , magnitude-only coloring
Negative theme handling:
- Auto (mirrors your chosen theme),
- Invert (flips the ramp),
- Custom (fully user-defined negative palette).
What this gives you:
- You can run a clean “mono” look for professional charts.
- Or a high-contrast heatmap for fast scanning.
- Or fully custom branding colors for BackQuant-style presentation.
────────────────────────────────────────────────────────────
Labels (what’s inside the label)
When labels are enabled, the script can display:
- OI , the aggregated OI value
- OI + Norm , OI plus normalized strength
- Norm Only , just the normalized strength
- Src + Norm , the selected source value (Delta, Raw, %) plus normalized strength
You can also control:
- Left/Center/Right label alignment
- Number formatting style (Raw, Compact, Volume format)
Best practice:
- Use “Src + Norm” when you want both the raw event size and its rarity.
- Use “Norm Only” when you want a clean, minimal chart.
────────────────────────────────────────────────────────────
Levels and object limits (performance and cleanliness)
Because this script draws objects, it includes a hard cleanup system:
- You set Max Levels / Labels to control chart clutter.
- The script deletes older lines/labels when the limit is exceeded.
This is critical if you trade lower timeframes, where OI events can trigger frequently.
────────────────────────────────────────────────────────────
How to interpret the signals
What a large bubble usually means:
- A statistically large positioning change relative to recent history.
- This can represent fresh leverage entering, forced liquidations, or aggressive de-risking, depending on direction and context.
How to use levels:
- Treat them as “attention levels”, not automatic entries.
- Combine them with structure and liquidity tools:
- If price revisits an OI level and shows rejection, it often confirms that level mattered.
- If price slices through with no reaction, it often indicates the OI event was transitional, not defended.
Common setups:
- Clustered extreme bubbles near a breakout zone, then retest later.
- Extreme negative event at capitulation low, followed by structure flip.
- Extreme positive build into resistance, then unwind and mean reversion.
Also, please check out @NoveltyTrade for the OI Aggregation logic & pulling the data source!
Here is the original script:
Indikator

Crypto Leverage Index(OI Norm. + FR)Crypto Leverage Index (OI Z-Score + Funding Rate Signals)
(A tool for detecting speculative extremes and leverage load in crypto derivatives markets.)
Hello, fellow traders around the globe!
In today's crypto futures market, often perceived as a 'playground for large players' (whales/smart money), catching extreme leverage behavior is crucial for survival. I wanted to come up with an indicator to quickly identify such market extremes by focusing on the two most potent indicators of leveraged action: Open Interest (OI) and Funding Rate (FR). The goal is to ride on the shoulders of the market movers by anticipating their next liquidity-driven actions. hope this helps.
❗ IMPORTANT NOTE: This indicator works exclusively on Perpetual Futures or Swap Charts that provide Open Interest (OI) data.
⚪ Overview
This indicator provides a standardized view of speculative activity by calculating the Open Interest (OI) Z-Score . This score reveals when the current level of open leverage is abnormally high (premium) or low (discount) relative to its historical mean and volatility. The index is also augmented with Extreme Funding Rate Signals , which plot simple White Dots on the chart when derivative positioning (long or short bias) reaches an unsustainable, overheated level. The combination of OI volume and positioning bias offers a good method to identify potential market reversal zones driven by leverage liquidation risks (short/long squeezes).
⚪ Score Components
Open Interest Z-Score (Leverage Load)
The primary component standardizes the Open Interest value over a defined lookback `Period` (default 50). This calculation reveals the statistical deviation of current leverage from the norm.
OI Z-Score = (OI - Mean(OI)) / StDev(OI)
Funding Rate (Positioning Bias)
Calculates the approximate funding rate using a TWAP (Time-Weighted Average Price) of the Perpetual Futures Premium, combined with the standard 0.01% Interest Rate.
⚪ Extreme Condition Detection
OI Z-Score Extremes
* Premium Zone (Red Fill) : OI Z-Score is above the user-defined `Threshold` (default 2.0). Indicates high/overstretched leverage.
* Discount Zone (Green Fill) : OI Z-Score is below the user-defined negative threshold (default -2.0). Indicates low/unwinded leverage.
Funding Rate Extreme Signals (White Dots)
These appear as small White Dots ( · ) plotted at fixed levels within the indicator pane. The position indicates the bias:
* Top Dot (Excessive Longs) : Triggered when Funding Rate is greater than Abnormal Funding Rate Threshold (e.g. 0.03%). Indicates excessive Long positioning/greed and potential for a short-term reversal (Long Squeeze risk). The dot is plotted at the positive `FR Signal Plot Level`.
* Bottom Dot (Excessive Shorts) : Triggered when Funding Rate is lower than -Abnormal Funding Rate Threshold(e.g. -0.03%). Indicates excessive Short positioning/fear and potential for a short-term reversal (Short Squeeze risk). The dot is plotted at the negative `FR Signal Plot Level`.
⚪ Leverage Case Scenarios (Price, OI Dynamics & Context)
The OI Z-Score reflects the premium/discount state of *leverage* (Open Interest) , not the price. The price may not be in a premium or discount area simply because the OI is. OI only indicates the volume of outstanding futures positions. You must observe price action and candlestick patterns alongside the OI movements to determine the true contextual hint. Understanding the relationship between price and Open Interest (OI) change is key to interpreting market movements. The cases listed below represent the most common and thinkable patterns, but do not exhaust all possible market behaviors.
1. Long Build-Up (Price ▲, OI ▲): New long positions enter, confirming the rising trend.
2. Short Build-Up (Price ▼, OI ▲): New short positions enter, confirming the falling trend. Due to the inherently long-biased nature of the crypto market, this scenario is less frequently observed than Long Build-Up.
3. Long Covering/liquidation (Price ▼, OI ▼): Existing longs are closed/liquidated. This activity usually results from Panic Selling or forced long liquidation.
4. Short Covering (Price ▲, OI ▼): Existing shorts are forced to close (Short Squeeze).
5. Long Trap (Price ▲, OI ▲ or ▼): Price rises, but OI suggests new positioning that might be trapping longs. Bearish candle pattern can be often shown with the sweep.
6. Short Trap (Price ▼, OI ▲ or ▼): Warning Sign - Price falls, but OI suggests new positioning that might be trapping shorts.
⚪ Key Input Parameters
OI Z-Score
* Period (Default: 50)
Determines how many recent bars are used to calculate the rolling mean and volatility (standard deviation) of the Open Interest data.
* Z-Score Threshold (Default: 2.0)
The critical level that the OI Z-Score must cross to be considered 'extreme' (overstretched leverage).
Funding Rate
* Abnormal FR Threshold (Default: 0.03)
The absolute percentage value (e.g., 0.03%) that the Funding Rate must exceed or fall below to trigger an extreme signal dot.
* FR Signal Plot Level (Default: 4.0)
Sets the fixed vertical position (Y-level) on the Z-Score chart where the Funding Rate signal dots will appear. (e.g., 4.0 plots the dot at the Z-Score +-4.0 level).
Disclaimer
This script is for educational and informational purposes only and does not constitute financial advice or investment recommendations. Trading cryptocurrencies involves significant risk and you are solely responsible for your own investment decisions, based on your financial situation, objectives, and risk tolerance. The author assumes no liability for losses arising from the use of this indicator. Indikator

Open Interest Z-Score [BackQuant]Open Interest Z-Score
A standardized pressure gauge for futures positioning that turns multi venue open interest into a Z score, so you can see how extreme current positioning is relative to its own history and where leverage is stretched, decompressing, or quietly re loading.
What this is
This indicator builds a single synthetic open interest series by aggregating futures OI across major derivatives venues, then standardises that aggregated OI into a rolling Z score. Instead of looking at raw OI or a simple change, you get a normalized signal that says "how many standard deviations away from normal is positioning right now", with optional smoothing, reference bands, and divergence detection against price.
You can render the Z score in several plotting modes:
Line for a clean, classic oscillator.
Colored line that encodes both sign and momentum of OI Z.
Oscillator histogram that makes impulses and compressions obvious.
The script also includes:
Aggregated open interest across Binance, Bybit, OKX, Bitget, Kraken, HTX, and Deribit, using multiple contract suffixes where applicable.
Choice of OI units, either coin based or converted to USD notional.
Standard deviation reference lines and adaptive extreme bands.
A flexible smoothing layer with multiple moving average types.
Automatic detection of regular and hidden divergences between price and OI Z.
Alerts for zero line and ±2 sigma crosses.
Aggregated open interest source
At the core is the same multi venue OI aggregation engine as in the OI RSI tool, adapted from NoveltyTrade's work and extended for this use case. The indicator:
Anchors on the current chart symbol and its base currency.
Loops over a set of exchanges, gated by user toggles:
Binance.
Bybit.
OKX.
Bitget.
Kraken.
HTX.
Deribit.
For each exchange, loops over several contract suffixes such as USDT.P, USD.P, USDC.P, USD.PM to cover the common perp and margin styles.
Requests OI candles for each exchange plus suffix pair into a small custom OI type that carries open, high, low and close of open interest.
Converts each OI stream into a common unit via the sw method:
In COIN mode, OI is normalized relative to the coin.
In USD mode, OI is scaled by price to approximate notional.
Exchange specific scaling factors are applied where needed to match contract multipliers.
Accumulates all valid OI candles into a single combined OI "candle" by summing open, high, low and close across venues.
The result is oiClose , a synthetic close for aggregated OI that represents cross venue positioning. If there is no valid OI data for the symbol after this process, the script throws a clear runtime error so you know the market is unsupported rather than quietly plotting nonsense.
How the Z score is computed
Once the aggregated OI close is available, the indicator computes a rolling Z score over a configurable lookback:
Define subject as the aggregated OI close.
Compute a rolling mean of this subject with EMA over Z Score Lookback Period .
Compute a rolling standard deviation over the same length.
Subtract the mean from the current OI and divide by the standard deviation.
This gives a raw Z score:
oi_z_raw = (subject − mean) ÷ stdDev .
Instead of plotting this raw value directly, the script passes it through a smoothing layer:
You pick a Smoothing Type and Smoothing Period .
Choices include SMA, HMA, EMA, WMA, DEMA, RMA, linear regression, ALMA, TEMA, and T3.
The helper ma function applies the chosen smoother to the raw Z score.
The result is oi_z , a smoothed Z score of aggregated open interest. A separate EMA with EMA Period is then applied on oi_z to create a signal line ma that can be used for crossovers and trend reads.
Plotting modes
The Plotting Type input controls how this Z score is rendered:
1) Line
In line mode:
The smoothed OI Z score is plotted as a single line using Base Line Color .
The EMA overlay is optionally plotted if Show EMA is enabled.
This is the cleanest view when you want to treat OI Z like a standard oscillator, watching for zero line crosses, swings, and divergences.
2) Colored Line
Colored line mode adds conditional color logic to the Z score:
If the Z score is above zero and rising, it is bright green, representing positive and strengthening positioning pressure.
If the Z score is above zero and falling, it shifts to a cooler cyan, representing positive but weakening pressure.
If the Z score is below zero and falling, it is bright red, representing negative and strengthening pressure (growing net de risking or shorting).
If the Z score is below zero and rising, it is dark red, representing negative but recovering pressure.
This mapping makes it easy to see not only whether OI is above or below its historical mean, but also whether that deviation is intensifying or fading.
3) Oscillator
Oscillator mode turns the Z score into a histogram:
The smoothed Z score is plotted as vertical columns around zero.
Column colors use the same conditional palette as colored line mode, based on sign and change direction.
The histogram base is zero, so bars extend up into positive Z and down into negative Z.
Oscillator mode is useful when you care about impulses in positioning, for example sharp jumps into positive Z that coincide with fast builds in leverage, or deep spikes into negative Z that show aggressive flushes.
4) None
If you only want reference lines, extreme bands, divergences, or alerts without the base oscillator, you can set plotting to None and keep the rest of the tooling active.
The EMA overlay respects plotting mode and only appears when a visible Z score line or histogram is present.
Reference lines and standard deviation levels
The Select Reference Lines input offers two styles:
Standard Deviation Levels
Plots small markers at zero.
Draws thin horizontal lines at +1, +2, −1 and −2 Z.
Acts like a classic Z score ladder, zero as mean, ±1 as normal band, ±2 as outer band.
This mode is ideal if you want a textbook statistical framing, using ±1 and ±2 sigma as standard levels for "normal" versus "extended" positioning.
Extreme Bands
Extreme bands build on the same ±1 and ±2 lines, then add:
Upper outer band between +3 and +4 Z.
Lower outer band between −3 and −4 Z.
Dynamic fill colors inside these bands:
If the Z score is positive, the upper band fill turns red with an alpha that scales with the magnitude of |Z|, capped at a chosen max strength. Stronger deviations towards +4 produce more opaque red fills.
If the Z score is negative, the lower band fill turns green with the same adaptive alpha logic, highlighting deep negative deviations.
Opposite side bands remain a faint neutral white when not in use, so they still provide structural context without shouting.
This creates a visual "danger zone" for position crowding. When the Z score enters these outer bands, open interest is many standard deviations away from its mean and you are dealing with rare but highly loaded positioning states.
Z score as a positioning pressure gauge
Because this is a Z score of aggregated open interest, it measures how unusual current positioning is relative to its own recent history, not just whether OI is rising or falling:
Z near zero means total OI is roughly in line with normal conditions for your lookback window.
Positive Z means OI is above its recent mean. The further above zero, the more "crowded" or extended positioning is.
Negative Z means OI is below its recent mean. Deep negatives often mark post flush environments where leverage has been cleared and the market is under positioned.
The smoothing options help control how much noise you want in the signal:
Short Z score lookback and short smoothing will react quickly, suited for short term traders watching intraday positioning shocks.
Longer Z score lookback with smoother MA types (EMA, RMA, T3) give a slower, more structural view of where the crowd sits over days to weeks.
Divergences between price and OI Z
The indicator includes automatic divergence detection on the Z score versus price, using pivot highs and lows:
You configure Pivot Lookback Left and Pivot Lookback Right to control swing sensitivity.
Pivots are detected on the OI Z series.
For each eligible pivot, the script compares OI Z and price at the last two pivots.
It looks for four patterns:
Regular Bullish – price makes a lower low, OI Z makes a higher low. This can indicate selling exhaustion in positioning even as price washes out. These are marked with a line and a label "ℝ" below the oscillator, in the bullish color.
Hidden Bullish – price makes a higher low, OI Z makes a lower low. This suggests continuation potential where price holds up while positioning resets. Marked with "ℍ" in the bullish color.
Regular Bearish – price makes a higher high, OI Z makes a lower high. This is a classic warning sign of trend exhaustion, where price pushes higher while OI Z fails to confirm. Marked with "ℝ" in the bearish color.
Hidden Bearish – price makes a lower high, OI Z makes a higher high. This is often seen in pullbacks within downtrends, where price retraces but positioning stretches again in the direction of the prevailing move. Marked with "ℍ" in the bearish color.
Each divergence type can be toggled globally via Show Detected Divergences . Internally, the script restricts how far back it will connect pivots, so you do not get stray signals linking very old structures to current bars.
Trading applications
Crowding and squeeze risk
Z scores are a natural way to talk about crowding:
High positive Z in aggregated OI means the market is running high leverage compared to its own norm. If price is also extended, the risk of a squeeze or sharp unwind rises.
Deep negative Z means leverage has been cleaned out. While it can be painful to sit through, this environment often sets up cleaner new trends, since there is less one sided positioning to unwind.
The extreme bands at ±3 to ±4 highlight the rare states where crowding is most intense. You can treat these events as regime markers rather than day to day noise.
Trend confirmation and fade selection
Combine Z score with price and trend:
Bull trends with positive and rising Z are supported by fresh leverage, usually more persistent.
Bull trends with flat or falling Z while price keeps grinding up can be more fragile. Divergences and extreme bands can help identify which edges you do not want to fade and which you might.
In downtrends, deep negative Z that stays pinned can mean persistent de risking. Once the Z score starts to mean revert back toward zero, it can mark the early stages of stabilization.
Event and liquidation context
Around major events, you often see:
Rapid spikes in Z as traders rush to position.
Reversal and overshoot as liquidations and forced de risking clear the book.
A move from positive extremes through zero into negative extremes as the market transitions from crowded to under exposed.
The Z score makes that path obvious, especially in oscillator mode, where you see a block of high positive bars before the crash, then a slab of deep negative bars after the flush.
Settings overview
Z Score group
Plotting Type – None, Line, Colored Line, Oscillator.
Z Score Lookback Period – window used for mean and standard deviation on aggregated OI.
Smoothing Type – SMA, HMA, EMA, WMA, DEMA, RMA, linear regression, ALMA, TEMA or T3.
Smoothing Period – length for the selected moving average on the raw Z score.
Moving Average group
Show EMA – toggle EMA overlay on Z score.
EMA Period – EMA length for the signal line.
EMA Color – color of the EMA line.
Thresholds and Reference Lines group
Select Reference Lines – None, Standard Deviation Levels, Extreme Bands.
Standard deviation lines at 0, ±1, ±2 appear in both modes.
Extreme bands add filled zones at ±3 to ±4 with adaptive opacity tied to |Z|.
Extra Plotting and UI
Base Line Color – default color for the simple line mode.
Line Width – thickness of the oscillator line.
Positive Color – positive or bullish condition color.
Negative Color – negative or bearish condition color.
Divergences group
Show Detected Divergences – master toggle for divergence plotting.
Pivot Lookback Left and Pivot Lookback Right – how many bars left and right to define a pivot, controlling divergence sensitivity.
Open Interest Source group
OI Units – COIN or USD.
Exchange toggles for Binance, Bybit, OKX, Bitget, Kraken, HTX, Deribit.
Internally, all enabled exchanges and contract suffixes are aggregated into one synthetic OI series.
Alerts included
The indicator defines alert conditions for several key events:
OI Z Score Positive – Z crosses above zero, aggregated OI moves from below mean to above mean.
OI Z Score Negative – Z crosses below zero, aggregated OI moves from above mean to below mean.
OI Z Score Enters +2σ – Z enters the +2 band and above, marking extended positive positioning.
OI Z Score Enters −2σ – Z enters the −2 band and below, marking extended negative positioning.
Tie these into your strategy to be notified when leverage moves from normal to extended states.
Notes
This indicator does not rely on price based oscillators. It is a statistical lens on cross venue open interest, which makes it a complementary tool rather than a replacement for your existing price or volume signals. Use it to:
Quantify how unusual current futures positioning is compared to recent history.
Identify crowded leverage phases that can fuel squeezes.
Spot structural divergences between price and positioning.
Frame risk and opportunity around events and regime shifts.
It is not a complete trading system. Combine it with your own entries, exits and risk rules to get the most out of what the Z score is telling you about positioning pressure under the hood of the market.
Indikator

Open Interest RSI [BackQuant]Open Interest RSI
A multi-venue open interest oscillator that aggregates OI across major derivatives exchanges, converts it to coin or USD terms, and runs an RSI-style engine on that aggregated OI so you can track positioning pressure, crowding, and mean reversion in leverage flows, not just in price.
What this is
This tool is an RSI built on top of aggregated open interest instead of price. It pulls futures OI from several major exchanges, converts it into a unified unit (COIN or USD), sums it into a single synthetic OI candle, then applies RSI and smoothing to that combined series.
You can then render that Open Interest RSI in different visual modes:
Clean line or colored line for classic oscillator-style reads.
Column-style oscillator for impulse and compression views.
Flag mode that fills between OI RSI and its EMA for trend/mean reversion blends. See:
Heatmap mode that paints the panel based on OI RSI extremes, ideal for scanning. See:
On top of that it includes:
Aggregated OI source selection (Binance, Bybit, OKX, Bitget, Kraken, HTX, Deribit).
Choice of OI units (COIN or USD).
Reference lines and OB/OS zones.
Extreme highlighting for either trend or mean reversion.
A vertical OI RSI meter that acts as a quick strength gauge.
Aggregated open interest source
Under the hood, the indicator builds a synthetic open interest candle by:
Looping over a list of supported exchanges: Binance, Bybit, OKX, Bitget, Kraken, HTX, Deribit.
Looping over multiple contract suffixes (such as USDT.P, USD.P, USDC.P, USD.PM) to capture different contract types on each venue.
Requesting OI candles from each venue + contract combination for the same underlying symbol.
Converting each OI stream into a common unit: In COIN mode, everything is normalized into coin-denominated OI. In USD mode, coin OI is multiplied by price to approximate notional OI.
Summing up open, high, low and close of OI across venues into a single aggregated OI candle.
If no valid OI is available for the current symbol across all sources, the script throws a clear runtime error so you know you are on an unsupported market.
This gives you a single, exchange-agnostic open interest curve instead of being tied to one venue. That aggregated OI is then passed into the RSI logic.
How the OI RSI is calculated
The RSI side is straightforward, but it is applied to the aggregated OI close:
Compute a base RSI of aggregated OI using the Calculation Period .
Apply a simple moving average of length Smoothing Period (SMA) to reduce noise in the raw OI RSI.
Optionally apply an EMA on top of the smoothed OI RSI as a moving average signal line.
Key parameters:
Calculation Period – base RSI length for OI.
Smoothing Period (SMA) – extra smoothing on the RSI value.
EMA Period – EMA length on the smoothed OI RSI.
The result is:
oi_rsi – raw RSI of aggregated OI.
oi_rsi_s – SMA-smoothed OI RSI.
ma – EMA of the smoothed OI RSI.
Thresholds and extremes
You control three core thresholds:
Mid Point – central reference level, typically 50.
Extreme Upper Threshold – high-level OI RSI edge (for example 80).
Extreme Lower Threshold – low-level OI RSI edge (for example 20).
These thresholds are used for:
Reference lines or OB/OS zone fills.
Heatmap gradient bounds.
Background highlighting of extremes.
The Extreme Highlighting mode controls how extremes are interpreted:
None – do nothing special in extreme regions.
Mean-Rev – background turns red on high OI RSI and green on low OI RSI, framing extremes as contrarian zones.
Trend – background turns green on high OI RSI and red on low OI RSI, framing extremes as participation zones aligned with the prevailing move.
Reference lines and OB/OS zones
You can choose:
None – clean plotting without guides.
Basic Reference Lines – mid, upper and lower thresholds as simple gray horizontals.
OB/OS Levels – filled zones between:
Upper OB: from the upper threshold to 100, colored with the short/overbought color.
Lower OS: from 0 to the lower threshold, colored with the long/oversold color.
These guides help visually anchor the OI RSI within "normal" versus "extreme" regions.
Plotting modes
The Plotting Type input controls how OI RSI is drawn. All modes share the same underlying OI and RSI logic, but emphasise different aspects of the signal.
1) Line mode
This is the classic oscillator representation:
Plots the smoothed OI RSI as a simple line using RSI Line Color and RSI Line Width .
Optionally plots the EMA overlay on the same panel.
Works well when you want standard RSI-style signals on leverage flows: crosses of the midline, divergences versus price, and so on.
2) Colored Line mode
In this mode:
The OI RSI is plotted as a line, but its color is dynamic.
If the smoothed OI RSI is above the mid point, it uses the Long/OB Color .
If it is below the mid point, it uses the Short/OS Color .
This creates an instant visual regime switch between "bullish positioning pressure" and "bearish positioning pressure", while retaining the feel of a traditional RSI line.
3) Oscillator mode
Oscillator mode renders OI RSI as vertical columns around the mid level:
The smoothed OI RSI is plotted as columns using plot.style_columns .
The histogram base is fixed at 50, so bars extend above and below the mid line.
Bar color is dynamic, using long or short colors depending on which side of the mid point the value sits.
This representation makes impulse and compression in OI flows more obvious. It is especially useful when you want to focus on how quickly OI RSI is expanding or contracting around its neutral level. See:
4) Flag mode
Flag mode turns OI RSI and its EMA into a two-line band with a filled area between them:
The smoothed OI RSI and its EMA are both plotted.
A fill is drawn between them.
The fill color flips between the long color and the short color depending on whether OI RSI is above or below its EMA.
Black outlines are added to both lines to make the band clear against any background.
This creates a "flag" style region where:
Green fills show OI RSI leading its EMA, suggesting positive positioning momentum.
Red fills show OI RSI trailing below its EMA, suggesting negative positioning momentum.
Crossovers of the two lines can be read as shifts in OI momentum regime.
Flag mode is useful if you want a more structural view that combines both the level and slope behaviour of OI RSI. See:
5) Heatmap mode
Heatmap mode recasts OI RSI as a single-row gradient instead of a line:
A single row at level 1 is plotted using column style.
The color is pulled from a gradient between the lower and upper thresholds: Near the lower threshold it approaches the short/oversold color and near the upper threshold it approaches the long/overbought color.
The EMA overlay and reference lines are disabled in this mode to keep the panel clean.
This is a very compact way to track OI RSI state at a glance, especially when stacking it alongside other indicators. See:
OI RSI vertical meter
Beyond the main plot, the script can draw a small "thermometer" table showing the current OI RSI position from 0 to 100:
The meter is a two-column table with a configurable number of rows.
Row colors form an inverted gradient: red at the top (100) and green at the bottom (0).
The script clamps OI RSI between 0 and 100 and maps it to a row index.
An arrow marker "▶" is drawn next to the row corresponding to the current OI RSI value.
0 and 100 labels are printed at the ends of the scale for orientation.
You control:
Show OI RSI Meter – turn the meter on or off.
OI RSI Blocks – number of vertical blocks (granularity).
OI RSI Meter Position – panel anchor (top/bottom, left/center/right).
The meter is particularly helpful if you keep the main plot in a small panel but still want an intuitive strength gauge.
How to read it as a market pressure gauge
Because this is an RSI built on aggregated open interest, its extremes and regimes speak to positioning pressure rather than price alone:
High OI RSI (near or above the upper threshold) indicates that open interest has been increasing aggressively relative to its recent history. This often coincides with crowded leverage and a buildup of directional pressure.
Low OI RSI (near or below the lower threshold) indicates aggressive de-leveraging or closing of positions, often associated with flushes, forced unwinds or post-liquidation clean-ups.
Values around the mid point indicate more balanced positioning flows.
You can combine this with price action:
Price up with rising OI RSI suggests fresh leverage joining the move, a more persistent trend.
Price up with falling OI RSI suggests shorts covering or longs taking profit, more fragile upside.
Price down with rising OI RSI suggests aggressive new shorts or levered selling.
Price down with falling OI RSI suggests de-leveraging and potential exhaustion of the move.
Trading applications
Trend confirmation on leverage flows
Use OI RSI to confirm or question a price trend:
In an uptrend, rising OI RSI with values above the mid point indicates supportive leverage flows.
In an uptrend, repeated failures to lift OI RSI above mid point or persistent weakness suggest less committed participation.
In a downtrend, strong OI RSI on the downside points to aggressive shorting.
Mean reversion in positioning
Use thresholds and the Mean-Rev highlight mode:
When OI RSI spends extended time above the upper threshold, the crowd is extended on one side. That can set up squeeze risk in the opposite direction.
When OI RSI has been pinned low, it suggests heavy de-leveraging. Once price stabilises, a re-risking phase is often not far away.
Background colours in Mean-Rev mode help visually identify these periods.
Regime mapping with plotting modes
Different plotting modes give different perspectives:
Heatmap mode for dashboard-style use where you just need to know "hot", "neutral" or "cold" on OI flows at a glance.
Oscillator mode for short term impulses and compression reads around the mid line. See:
Flag mode for blending level and trend of OI RSI into a single banded visual. See:
Settings overview
RSI group
Plotting Type – None, Line, Colored Line, Oscillator, Flag, Heatmap.
Calculation Period – base RSI length for OI.
Smoothing Period (SMA) – smoothing on RSI.
Moving Average group
Show EMA – toggle EMA overlay (not used in heatmap).
EMA Period – length of EMA on OI RSI.
EMA Color – colour of EMA line.
Thresholds group
Mid Point – central reference.
Extreme Upper Threshold and Extreme Lower Threshold – OB/OS thresholds.
Select Reference Lines – none, basic lines or OB/OS zone fills.
Extreme Highlighting – None, Mean-Rev, Trend.
Extra Plotting and UI
RSI Line Color and RSI Line Width .
Long/OB Color and Short/OS Color .
Show OI RSI Meter , OI RSI Blocks , OI RSI Meter Position .
Open Interest Source
OI Units – COIN or USD.
Exchange toggles: Binance, Bybit, OKX, Bitget, Kraken, HTX, Deribit.
Notes
This is a positioning and pressure tool, not a complete system. It:
Models aggregated futures open interest across multiple centralized exchanges.
Transforms that OI into an RSI-style oscillator for better comparability across regimes.
Offers several visual modes to match different workflows, from detailed analysis to compact dashboards.
Use it to understand how leverage and positioning are evolving behind the price, to gauge when the crowd is stretched, and to decide whether to lean with or against that pressure. Attach it to your existing signals, not in place of them.
Also, please check out @NoveltyTrade for the OI Aggregation logic & pulling the data source!
Here is the original script:
Indikator

Aggregated Open InterestAggregates Open Interest data across 10 major crypto exchanges: Binance, Bybit, Kraken, MEXC, Bitget, BingX, Coinbase, Deribit, HTX, and Crypto.com.
Displays total market OI with candlesticks on intraday timeframes and a step line on daily+ timeframes. Color-coded: teal for increasing OI, red for decreasing OI.
Toggle individual exchanges on/off in settings to customize your view.
With this indicator there is no need to be on the perpetual chart of the asset for the open interest to be displayed. Indikator

Major exchages total Open interest & Long/Short OI trends📊 Indicator: Major Exchanges Total OI & Long/Short Trends
This Pine Script™ indicator is designed to provide a comprehensive analysis of Open Interest (OI) and Long/Short position trends across major cryptocurrency exchanges (Binance, Bybit, OKX, Bitget, HTX, Deribit). It serves as a powerful tool for traders seeking to understand market liquidity, participant positioning, and overall market sentiment.
🔑 Key Features and Functionalities
Aggregated Multi-Exchange Open Interest (OI):
Consolidates real-time Open Interest data from user-selected major cryptocurrency exchanges.
Provides a unified view of the total OI, offering insights into the collective market liquidity and the aggregate size of participants' open positions.
Visualized Combined OI Candles:
Presents the aggregated total OI data in a candlestick chart format.
Displays the Open, High, Low, and Close of the combined OI, with color variations indicating increases or decreases from the previous period. This enables intuitive visualization of OI trend shifts.
Estimated Long/Short OI and Visualization:
Calculates and visualizes estimated Long and Short position Open Interest based on the total aggregated OI data.
Estimation Logic:
Employs a sophisticated logic that considers both price changes and OI fluctuations to infer the balance between Long and Short positions. For instance, an increase in both price and OI may suggest an accumulation of Long positions, while a price decrease coupled with an OI increase might indicate growing Short positions.
Initial 50:50 Ratio:
The estimation for Long/Short OI begins with an assumption of a 50:50 ratio at the initial data point available for the selected timeframe. This establishes a neutral baseline, from which subsequent price and OI changes drive the divergence and evolution of the estimated Long/Short balance.
Flexible Visualization Options:
Allows users to display Long/Short OI data in either line or candlestick styles, with customizable color schemes. This flexibility aids in clearly discerning bullish or bearish positioning trends.
💡 Development Background
The development of this indicator stems from the critical importance of Open Interest data in the cryptocurrency derivatives market. Recognizing the limitations of analyzing individual exchange OI in isolation, the primary objective was to integrate data from leading exchanges to offer a holistic perspective on market sentiment and overall positioning dynamics.
The inclusion of the Long/Short position estimation feature is crucial for deciphering the specific directional biases of market participants, which is often not evident from raw OI data alone. This enables a deeper understanding of how positions are being accumulated or liquidated, moving beyond simple OI change analysis.
Furthermore, a key design consideration was to leverage the characteristic where the indicator's data start point dynamically adjusts with the chart's timeframe selection. This allows for the analysis of short-term Long/Short trends on shorter timeframes and long-term trends on longer timeframes. This inherent flexibility empowers traders to conduct analyses across various time scales, aligning with their diverse trading strategies.
🚀 Trading Applications
Leveraging Combined Open Interest (OI):
Trend Confirmation: A sustained increase in total OI signifies growing market interest and capital inflow, potentially confirming the strength of an existing trend. Conversely, decreasing OI may suggest diminishing participant interest or widespread position liquidation.
Validation of Price Extremes: If price forms a new high but OI fails to increase or declines, it could signal a potential trend reversal (divergence). Conversely, a sharp increase in OI during a price decline might indicate a surge in short positions or renewed selling pressure.
Identifying Volatility Triggers: Monitoring rapid shifts in OI during significant news events or market catalysts can help assess immediate market reactions and liquidity changes.
📈Utilizing Long/Short OI Trends
Assessing Market Bias: A sustained dominance or rapid increase in Long OI suggests a prevalent bullish sentiment, which could inform decisions to enter or maintain long positions. The inverse scenario indicates bearish sentiment and potential short entry opportunities.
Anticipating Squeezes: The indicator can help identify scenarios conducive to short or long squeezes. Excessive short positioning followed by a price uptick can trigger a short squeeze, leading to rapid price appreciation. Conversely, an oversupply of long positions preceding a price drop can result in a long squeeze and sharp declines.
Divergence Analysis: Divergences between price action and Long/Short OI estimates can signal potential trend reversals. For example, if price is rising but the increase in Long OI slows down or Short OI begins to grow, it may suggest weakening buying pressure.
🕔Timeframe-Specific Trend Analysis:
Shorter Timeframes (e.g., 1m, 5m, 15m): Ideal for identifying short-term shifts in participant positioning, beneficial for day trading and scalping strategies. Provides insights into immediate market reactions to price movements.
Longer Timeframes (e.g., 1h, 4h, Daily): Valuable for evaluating broader positioning trends and the sustainability or potential reversal of medium-to-long-term trends. Offers a macro perspective on Long/Short dynamics, suitable for swing trading or long-term investment strategies.
This indicator integrates complex market data, provides nuanced Long/Short position estimations, and offers multi-timeframe analytical capabilities, empowering traders to make more informed and strategic decisions. Indikator

Indikator

Aggregated Open Interest Multi-Exchange (USD)This indicator aggregates Open Interest (OI) data from multiple major cryptocurrency exchanges into a single unified view in USD, using data available on TradingView. It automatically adapts to the asset you're viewing on the chart.
Features:
Aggregates OI from 7 major exchanges: Binance, Bybit, OKX, Bitget, Deribit, HTX, and Coinbase
All values converted to USD - unlike native OI which shows contracts/coins
Uses only data available on TradingView platform
Automatically detects the asset from your chart (BTC, ETH, SOL, etc.)
True apples-to-apples comparison across exchanges
Displays as candlesticks showing OI open, high, low, and close
Toggle exchanges on/off individually
Handles different contract types per exchange automatically
Why USD conversion matters:
Traditional OI indicators show values in contracts or crypto units, making it difficult to compare across exchanges. This indicator converts everything to USD, giving you the real dollar value of open positions across all exchanges.
How it works:
Simply add the indicator to any crypto perpetual futures chart. It will automatically fetch and aggregate OI data from all supported exchanges for that asset using TradingView's built-in data feeds, converting everything to USD.
Supported Exchanges:
Binance, Bybit, Bitget, HTX: USDT perpetuals
Deribit: BTC/ETH use USD contracts, others use USDC
OKX: Contract-based (automatically converted)
Coinbase: USDC perpetuals
Perfect for traders who want a comprehensive view of total market Open Interest in USD across exchanges using reliable TradingView data.
Indikator

Order Flow RSI - Price / CVD / OIOrder Flow RSI blends three powerful market perspectives — Price , Cumulative Volume Delta (CVD) , and Open Interest (OI) — into one unified RSI-style oscillator.
It reveals momentum and imbalance across these data streams and highlights situations where participation, liquidity, and positioning disagree — moments that often precede reversals.
What it does
The indicator converts:
Price → RSI (classic momentum),
CVD → RSI (buy/sell pressure balance),
OI → RSI (position expansion/contraction)
…then plots all three RSIs together on the same 0–100 scale.
A fourth Consensus RSI (average of any two or all three) can optionally be shown to simplify the view.
Core logic
CVD engine – based on TradingView’s native volume-delta request.
Modes: Continuous (default, smooth line), Anchored (resets each session), Rolling window.
Open Interest – pulled automatically from the symbol’s “_OI” feed; aligns to chart timeframe for real-time flow.
RSI calculation – standard RSI applied to each data stream, optionally smoothed (SMA / EMA / RMA / WMA / VWMA).
Signals – optional background highlights when:
All three RSIs are overbought (red) or oversold (green), or
Any pair show opposite extremes (e.g., price overbought + OI oversold).
Consensus RSI – arithmetic mean of the selected RSIs, summarizing overall market tone.
Inputs overview
CVD settings: anchor period, lower-TF delta, mode, rolling length
RSI lengths: separate for price, CVD, OI
Smoothing: type + period applied to all RSIs at once
Consensus: choose which RSIs to average
Signals: enable/disable each combination; optional alerts
Levels: adjustable OB/MID/OS (default 70 / 50 / 30)
Visuals: fill between active RSIs, background highlights, level lines, colors in Style tab
How to read it
All 3 overbought (red): broad exhaustion → possible correction
All 3 oversold (green): broad depletion → possible bounce
Opposite pairs: divergence between price and participation
Price↑ but OI↓ (red) → weak rally, fading participation
Price↓ but CVD↑ (green) → hidden accumulation
Combine with structure and volume profile for confirmation.
Notes
Works best on assets with full CVD + OI data (futures, BTC, etc.).
Use Continuous CVD for smooth RSI, Anchored for session analysis.
Smoothing 2–5 EMA is a good starting point to reduce noise.
All styling (colors, line types, thickness) is adjustable in the Style tab.
Limitations & caveats
CVD requires accurate tick/volume/delta data from your data feed. Performance may differ across instruments.
OI availability varies by exchange / symbol. Where OI is absent, pairwise OI signals are not evaluated.
This indicator is a tool — it generates signals of interest, not guaranteed profitable trades. Backtest and combine with your risk rules.
Smoothing introduces lag; longer smoothing reduces noise but delays signals.
Order Flow RSI bridges traditional momentum analysis and order-flow context — giving a multi-dimensional view of when markets are truly stretched or quietly reloading.
Sometimes it works, sometimes it doesn't. Indikator
