OPEN-SOURCE SCRIPT
CVD Multi Exchange Percentile

CVD Multi Exchange Percentile
Aggregated order flow across four major crypto derivatives exchanges — with historical percentile ranking to measure how extreme today's session really is.
A Cumulative Volume Delta (CVD) indicator with daily reset, divergence detection, and absorption signals, built for perpetual futures.
It combines Binance, Bybit, OKX, and Bitget into a single aggregated flow, then ranks it against its own history to give you objective context.
█ 🧩 KEY FEATURES
🔹 Multi Exchange Aggregation
Four sources (Binance, Bybit, OKX, Bitget) can be toggled independently. The aggregated delta captures cross-exchange order flow that single-source CVD cannot detect — especially during liquidations or arbitrage-driven moves.
🔹 Historical Percentile System
Each session's peak CVD is stored in a rolling buffer, separated by direction (bull vs bear). The current session is ranked against this distribution to measure how extreme the flow is compared to recent history.
🔹 Live Percentile
A real-time percentile tracks the current CVD value as the session develops — no need to wait for session close.
🔹 Swing Divergence
Detects divergences between price and CVD structure:
- Bullish: price makes lower low, CVD makes higher low
- Bearish: price makes higher high, CVD makes lower high
Filtered by percentile threshold and optional trend filter.
🔹 Volume Absorption
Highlights conditions where price and CVD move in opposite directions under high volume:
- Bullish absorption: price down, CVD up
- Bearish absorption: price up, CVD down
Requires elevated volume and percentile confirmation.
🔹 Visual Encoding
Histogram color reflects direction and momentum. Signal markers:
- Divergence bullish: dark green triangle up
- Divergence bearish: blue triangle down
- Absorption bullish: orange circle
- Absorption bearish: purple circle
Optional info table provides real-time stats.
Signal examples on TRXUSDT.P (1H) — three signal types visible:
- Orange circle (Absorption Bull): price dropping but CVD rising on high volume — buying pressure hidden under falling price
- Blue triangle (DIV- Bearish): price making higher high but CVD making lower high — selling pressure building despite rising price
- Purple circle (Absorption Bear): price rising but CVD falling on high volume — selling pressure hidden under rising price

Signal examples on ETHUSDT.P (1H) — bullish signals visible:
- Dark green triangles (DIV+ Bullish): price making lower lows but CVD making higher lows — buying pressure increasing despite falling price, signaling potential reversal
- Orange circle (Absorption Bull): same logic as above — hidden buying under selling candles

█ 🔧 HOW IT WORKS
The script fetches lower-timeframe OHLCV data from each exchange using `request.security_lower_tf()`.
Each intrabar volume is classified using a CLV-based model (close location within range) to estimate buying vs selling pressure. The resulting deltas are summed across all exchanges and accumulated into a daily CVD, resetting at the start of each new UTC session.
█ 📖 HOW TO USE
Apply the indicator to Perpetual Futures charts (.P).
The symbol is auto-detected from the chart and mapped across all supported exchanges — no manual input needed.
Suggested timeframe: 1H (default percentile lookback is 336 bars, which equals ~14 days on 1H charts).
Signals are contextual, not standalone triggers. Use them to identify:
- flow/price divergences
- potential absorption zones
- extreme participation conditions
█ ⚙️ SETTINGS
Data Sources (Perpetual Futures Only) — Enable/disable Binance, Bybit, OKX, Bitget
Settings — Intrabar precision (1/5/15/60), daily reset
Signals — Percentile lookback (default 336 bars, ~14 days on 1H), min percentile for divergence (75), swing length (8), trend filter SMA (20), absorption volume lookback (10) and multiplier (1.5), show/hide toggles for divergences, absorption, trend filter, and info table
█ 💡 WHAT MAKES THIS DIFFERENT
Most CVD indicators rely on a single exchange and lack statistical context.
This script aggregates flow across venues and ranks it using a percentile system, providing a clear measure of whether current activity is extreme or routine.
Bull and bear distributions are handled separately, avoiding distortion from mixed data.
█ ⚠️ LIMITATIONS
— Works only on perpetual futures (.P required)
— Delta is estimated from OHLCV, not tick-level order book data
— Exchange data availability may vary by symbol
— Intrabar resolution affects precision and performance
█ 📌 DISCLAIMER
This is a contextual analysis tool, not a signal generator.
It does not provide buy/sell signals and should not be used as a standalone trading system. Always apply proper risk management.
Aggregated order flow across four major crypto derivatives exchanges — with historical percentile ranking to measure how extreme today's session really is.
A Cumulative Volume Delta (CVD) indicator with daily reset, divergence detection, and absorption signals, built for perpetual futures.
It combines Binance, Bybit, OKX, and Bitget into a single aggregated flow, then ranks it against its own history to give you objective context.
█ 🧩 KEY FEATURES
🔹 Multi Exchange Aggregation
Four sources (Binance, Bybit, OKX, Bitget) can be toggled independently. The aggregated delta captures cross-exchange order flow that single-source CVD cannot detect — especially during liquidations or arbitrage-driven moves.
🔹 Historical Percentile System
Each session's peak CVD is stored in a rolling buffer, separated by direction (bull vs bear). The current session is ranked against this distribution to measure how extreme the flow is compared to recent history.
🔹 Live Percentile
A real-time percentile tracks the current CVD value as the session develops — no need to wait for session close.
🔹 Swing Divergence
Detects divergences between price and CVD structure:
- Bullish: price makes lower low, CVD makes higher low
- Bearish: price makes higher high, CVD makes lower high
Filtered by percentile threshold and optional trend filter.
🔹 Volume Absorption
Highlights conditions where price and CVD move in opposite directions under high volume:
- Bullish absorption: price down, CVD up
- Bearish absorption: price up, CVD down
Requires elevated volume and percentile confirmation.
🔹 Visual Encoding
Histogram color reflects direction and momentum. Signal markers:
- Divergence bullish: dark green triangle up
- Divergence bearish: blue triangle down
- Absorption bullish: orange circle
- Absorption bearish: purple circle
Optional info table provides real-time stats.
Signal examples on TRXUSDT.P (1H) — three signal types visible:
- Orange circle (Absorption Bull): price dropping but CVD rising on high volume — buying pressure hidden under falling price
- Blue triangle (DIV- Bearish): price making higher high but CVD making lower high — selling pressure building despite rising price
- Purple circle (Absorption Bear): price rising but CVD falling on high volume — selling pressure hidden under rising price
Signal examples on ETHUSDT.P (1H) — bullish signals visible:
- Dark green triangles (DIV+ Bullish): price making lower lows but CVD making higher lows — buying pressure increasing despite falling price, signaling potential reversal
- Orange circle (Absorption Bull): same logic as above — hidden buying under selling candles
█ 🔧 HOW IT WORKS
The script fetches lower-timeframe OHLCV data from each exchange using `request.security_lower_tf()`.
Each intrabar volume is classified using a CLV-based model (close location within range) to estimate buying vs selling pressure. The resulting deltas are summed across all exchanges and accumulated into a daily CVD, resetting at the start of each new UTC session.
█ 📖 HOW TO USE
Apply the indicator to Perpetual Futures charts (.P).
The symbol is auto-detected from the chart and mapped across all supported exchanges — no manual input needed.
Suggested timeframe: 1H (default percentile lookback is 336 bars, which equals ~14 days on 1H charts).
Signals are contextual, not standalone triggers. Use them to identify:
- flow/price divergences
- potential absorption zones
- extreme participation conditions
█ ⚙️ SETTINGS
Data Sources (Perpetual Futures Only) — Enable/disable Binance, Bybit, OKX, Bitget
Settings — Intrabar precision (1/5/15/60), daily reset
Signals — Percentile lookback (default 336 bars, ~14 days on 1H), min percentile for divergence (75), swing length (8), trend filter SMA (20), absorption volume lookback (10) and multiplier (1.5), show/hide toggles for divergences, absorption, trend filter, and info table
█ 💡 WHAT MAKES THIS DIFFERENT
Most CVD indicators rely on a single exchange and lack statistical context.
This script aggregates flow across venues and ranks it using a percentile system, providing a clear measure of whether current activity is extreme or routine.
Bull and bear distributions are handled separately, avoiding distortion from mixed data.
█ ⚠️ LIMITATIONS
— Works only on perpetual futures (.P required)
— Delta is estimated from OHLCV, not tick-level order book data
— Exchange data availability may vary by symbol
— Intrabar resolution affects precision and performance
█ 📌 DISCLAIMER
This is a contextual analysis tool, not a signal generator.
It does not provide buy/sell signals and should not be used as a standalone trading system. Always apply proper risk management.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Alessandro Lavarello
Author and Analyst for Criptovaluta.it®
Trader since 2007, Technical Analyst
Member of SIAT_italia (Italian Society of Technical Analysis)
Twitter: @Trading975
Author and Analyst for Criptovaluta.it®
Trader since 2007, Technical Analyst
Member of SIAT_italia (Italian Society of Technical Analysis)
Twitter: @Trading975
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Alessandro Lavarello
Author and Analyst for Criptovaluta.it®
Trader since 2007, Technical Analyst
Member of SIAT_italia (Italian Society of Technical Analysis)
Twitter: @Trading975
Author and Analyst for Criptovaluta.it®
Trader since 2007, Technical Analyst
Member of SIAT_italia (Italian Society of Technical Analysis)
Twitter: @Trading975
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.