OPEN-SOURCE SCRIPT
Order Flow RSI — Price / CVD / OI

Order 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:
…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
Inputs overview
How to read it
Combine with structure and volume profile for confirmation.
Notes
Limitations & caveats
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.
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.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.
Script de código abierto
Siguiendo fielmente el espíritu de TradingView, el creador de este script lo ha publicado en código abierto, permitiendo que otros traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la publicación de este código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.