PROTECTED SOURCE SCRIPT
Buy/Sell Volume - Tradingriot

This indicator estimates buy-side and sell-side volume using a RangeSplit model. Since TradingView does not provide true bid/ask aggressor data, the script allocates each bar’s volume based on where the close sits within the bar’s high–low range. The closer the close is to the high, the more of that bar’s volume is attributed to buying pressure. The closer it is to the low, the more is attributed to selling pressure.
How it works
Compute the bar’s total range
range = high − low
Locate the close inside that range
fraction = (close − low) / range
Allocate volume
Buy Volume = volume × fraction
Sell Volume = volume × (1 − fraction)
Apply an optional EMA smooth to stabilize the signals.
Plots
Buy Volume (green columns) – estimated buy-side participation
Sell Volume (red columns) – estimated sell-side participation
Delta Line (gray) – smoothed difference between buy and sell volume
Zero line – helps identify positive or negative volume imbalance
Use-case
This gives a quick visual read of dominant pressure inside each bar without relying on unreliable raw volume bars. It can help highlight shifts in control, volume imbalances, and momentum transitions on higher timeframes.
Limitations
This is a proxy, not true buy/sell volume. It does not access bid/ask or time-and-sales data. It simply distributes total volume by candle geometry.
If you want a clean and simple way to visualize who likely controlled the bar, this is as far as TradingView can go using OHLCV data.
How it works
Compute the bar’s total range
range = high − low
Locate the close inside that range
fraction = (close − low) / range
Allocate volume
Buy Volume = volume × fraction
Sell Volume = volume × (1 − fraction)
Apply an optional EMA smooth to stabilize the signals.
Plots
Buy Volume (green columns) – estimated buy-side participation
Sell Volume (red columns) – estimated sell-side participation
Delta Line (gray) – smoothed difference between buy and sell volume
Zero line – helps identify positive or negative volume imbalance
Use-case
This gives a quick visual read of dominant pressure inside each bar without relying on unreliable raw volume bars. It can help highlight shifts in control, volume imbalances, and momentum transitions on higher timeframes.
Limitations
This is a proxy, not true buy/sell volume. It does not access bid/ask or time-and-sales data. It simply distributes total volume by candle geometry.
If you want a clean and simple way to visualize who likely controlled the bar, this is as far as TradingView can go using OHLCV data.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. However, you can use it freely and without any limitations – learn more here.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. However, you can use it freely and without any limitations – learn more here.
Penafian
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.