OPEN-SOURCE SCRIPT

Aggregated Open interest + Volume Delta

142
Aggregated 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

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.