OPEN-SOURCE SCRIPT
Zaktualizowano Open Interest Flow & Context Overlay [HYPR-run]

DESCRIPTION:
Reads Binance perpetual open interest and classifies each bar into one of eight context states based on OI direction, price direction, and volume direction. Flow arrows show how open interest is developing bar by bar; the context matrix tells you what it means. OI rising + price rising + volume rising = new longs with conviction. OI rising + price falling + volume rising = new shorts with conviction. OI falling + price falling = long squeeze (liquidation, trend acceleration). OI falling + price rising + volume = short squeeze (covering, trend acceleration). The matrix answers: who is entering, who is exiting, and is volume confirming?
DISCOVERING EDGE
This indicator classifies every bar into eight context states by combining OI direction, price direction, and volume direction into a single read. In order to gain a persistent, mechanical edge in distinguishing real demand from forced covering and genuine selling from liquidation, we explored a more meaningful expression of open interest flow that resulted in strong confirmation signals that became actual entry/exit signals (Large Outline Triangles on chart) in our latest automated strategies.
8 OI CONTEXT STATES vs RAW OI CANDLES
Raw OI rising tells you positions are opening but not who or why. Eight context states (new longs with volume, short squeeze, long liquidation, etc.) answer who is entering, who is exiting, and whether volume confirms, turning a single data stream into actionable positioning context. Arrow color hierarchy gives the instant read: green/bright red = fresh direction flip (highest conviction); cyan/orange = continuation; purple = no volume confirmation (lower conviction but a staple of grinding price action in intermediate trend. Dashboard distinguishes "LONG, New Longs + Volume" from "Short Squeeze, Accumulation"; both show price rising, but one is real demand and the other is forced covering that ends when covering is done. Alerts fire only on strong OI signals (OI + price + volume all aligned) with full bar filter and directional candle confirmation; three layers of filtering before the signal fires.
FEATURES
- Eight OI context states with color-coded overlay arrows
- Two-row dashboard: OI context state + OI flow arrows with color badges
- Strong/weak filter: price + volume + OI alignment required for full signals
- Direction flip tracking: fresh signals vs continuation (brighter vs dimmer)
- ZLEMA-based trend detection (smoother than raw crossovers)
- Webhook-ready alerts on strong OI signals with full bar filter
- Full bar filter: body >= 66.6% of range (no doji fakeouts)
DASHBOARD
Two-row display: OI context state and OI flow. Row 1 classifies the current bar from the eight-state matrix. Row 2 shows the active flow arrow state matching the arrows on chart.
OI CONTEXT TABLE (Dashboard row 1)
OI FLOW TABLE (Dashboard row 2)

HOW IT WORKS
ZLEMA (zero-lag EMA) detects rising/falling direction on three inputs: open interest, price, and volume. The combination determines the context state. Strong signals require all three aligned. A fixnan state variable tracks direction flips to distinguish fresh entries from continuation. OI data is pulled from Binance perpetual contracts (USDT or coin-margined). Auto-detects the coin from the chart symbol, or enter manually for non-Binance tickers.
ALERTS
Fires on strong OI long/short signals (all three aligned) with a full directional bar. Fresh direction flips are distinguished from continuation. Alert payload is built into the script; works with any webhook receiver.
CREDITS
OI data approach: ByzantiumScripts, spacemanbtc
Reads Binance perpetual open interest and classifies each bar into one of eight context states based on OI direction, price direction, and volume direction. Flow arrows show how open interest is developing bar by bar; the context matrix tells you what it means. OI rising + price rising + volume rising = new longs with conviction. OI rising + price falling + volume rising = new shorts with conviction. OI falling + price falling = long squeeze (liquidation, trend acceleration). OI falling + price rising + volume = short squeeze (covering, trend acceleration). The matrix answers: who is entering, who is exiting, and is volume confirming?
DISCOVERING EDGE
This indicator classifies every bar into eight context states by combining OI direction, price direction, and volume direction into a single read. In order to gain a persistent, mechanical edge in distinguishing real demand from forced covering and genuine selling from liquidation, we explored a more meaningful expression of open interest flow that resulted in strong confirmation signals that became actual entry/exit signals (Large Outline Triangles on chart) in our latest automated strategies.
8 OI CONTEXT STATES vs RAW OI CANDLES
Raw OI rising tells you positions are opening but not who or why. Eight context states (new longs with volume, short squeeze, long liquidation, etc.) answer who is entering, who is exiting, and whether volume confirms, turning a single data stream into actionable positioning context. Arrow color hierarchy gives the instant read: green/bright red = fresh direction flip (highest conviction); cyan/orange = continuation; purple = no volume confirmation (lower conviction but a staple of grinding price action in intermediate trend. Dashboard distinguishes "LONG, New Longs + Volume" from "Short Squeeze, Accumulation"; both show price rising, but one is real demand and the other is forced covering that ends when covering is done. Alerts fire only on strong OI signals (OI + price + volume all aligned) with full bar filter and directional candle confirmation; three layers of filtering before the signal fires.
FEATURES
- Eight OI context states with color-coded overlay arrows
- Two-row dashboard: OI context state + OI flow arrows with color badges
- Strong/weak filter: price + volume + OI alignment required for full signals
- Direction flip tracking: fresh signals vs continuation (brighter vs dimmer)
- ZLEMA-based trend detection (smoother than raw crossovers)
- Webhook-ready alerts on strong OI signals with full bar filter
- Full bar filter: body >= 66.6% of range (no doji fakeouts)
DASHBOARD
Two-row display: OI context state and OI flow. Row 1 classifies the current bar from the eight-state matrix. Row 2 shows the active flow arrow state matching the arrows on chart.
OI CONTEXT TABLE (Dashboard row 1)
OI FLOW TABLE (Dashboard row 2)
HOW IT WORKS
ZLEMA (zero-lag EMA) detects rising/falling direction on three inputs: open interest, price, and volume. The combination determines the context state. Strong signals require all three aligned. A fixnan state variable tracks direction flips to distinguish fresh entries from continuation. OI data is pulled from Binance perpetual contracts (USDT or coin-margined). Auto-detects the coin from the chart symbol, or enter manually for non-Binance tickers.
ALERTS
Fires on strong OI long/short signals (all three aligned) with a full directional bar. Fresh direction flips are distinguished from continuation. Alert payload is built into the script; works with any webhook receiver.
CREDITS
OI data approach: ByzantiumScripts, spacemanbtc
Informacje o Wersji
HOW TO USEAdd to chart. The indicator auto-detects the coin from your chart symbol and pulls OI data from Binance perpetual contracts (USDT or coin-margined); enter manually for non-Binance tickers. Read the dashboard: row 1 tells you the context state (who is entering/exiting and whether volume confirms), row 2 shows the flow arrow state matching the arrows on chart.
Two marker types on chart: large outline triangles (▵/▿) are strong OI signals where all three inputs align with a full directional bar; small arrows (^/⌄) are flow arrows showing all OI activity including unconfirmed. Arrow colors give the instant read: green/bright red = fresh direction flip (highest conviction); cyan/orange = continuation; purple = no volume confirmation.
ALERTS
Alerts fire on strong OI signals only (▵/▿): OI rising + price trending + volume confirming + full directional bar (body >= 66.6% of range). Three layers of filtering before the signal fires. Toggle Alert Long and Alert Short independently.
For notifications without webhooks, create a TradingView alert with condition = this indicator, "Any alert() function call", and select push notification, email, or popup.
For webhook execution, paste your endpoint URL in the alert's Webhook URL field, set Open-ended, create. Long sends {"market":"PERPS","ticker":"...","position":"LONG",...}. Short sends the same with "position":"SHORT".
ZLEMA TREND DETECTION
Uses zero-lag EMA (2 * EMA - EMA of EMA) to detect rising/falling direction on OI, price, and volume. Smoother than raw crossovers, catches trend changes earlier than simple moving averages.
DIRECTION FLIP TRACKING
Tracks when the OI context flips from bearish to bullish (or vice versa) using a fixnan state variable that persists the last strong signal direction. Fresh flips get brighter colors (green for longs, bright red for shorts); continuation signals are dimmer (cyan/orange). This prevents redundant alerts on consecutive bars in the same direction.
Informacje o Wersji
Table now shows L/S Alerts message. And providing a contextual legend to read arrows and colors on the chart.https://www.tradingview.com/x/Y2Rwvu30/
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Execute alerts and strategies via webhooks + in-app quick tap trading, auto-sizing and trade automation on your phone - all on Hyperliquid | hypr.run
Trade. Automate. Live your life.
Trade. Automate. Live your life.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Execute alerts and strategies via webhooks + in-app quick tap trading, auto-sizing and trade automation on your phone - all on Hyperliquid | hypr.run
Trade. Automate. Live your life.
Trade. Automate. Live your life.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.