The VSI (Volume Strength Indicator) is a powerful tool that combines Relative Strength Index (RSI) calculations with various volume-based metrics to provide a clearer picture of market momentum. Traditional RSI focuses solely on price movements, but VSI enhances this by integrating volume strength, offering traders deeper insights into price action confirmation and potential reversals.
By incorporating different volume sources such as On-Balance Volume (OBV), Accumulation/Distribution (ADL), Elder’s Force Index (EFI), and Price Volume Trend (PVT), the VSI indicator provides a multi-dimensional approach to identifying market strength and weakness.
The VSI consists of two main components:
Additionally, VSI features a volume histogram, which normalizes volume fluctuations and provides a visual representation of buying and selling pressure in the market.
The first step in the VSI calculation is applying a standard RSI to the price data. This is done using a default length of 13 periods, but can be adjusted based on user preference. The result is further smoothed using a linear regression filter for better signal clarity.
VSI allows traders to choose different volume indicators as the base for the RSI calculation:
The selected volume-based data is then processed using an RSI calculation, with the same length parameter as the price RSI. Like the price RSI, it is smoothed using a linear regression function.
The VSI also includes a volume histogram that helps visualize market activity. This histogram is calculated by:
Additionally, users can choose between:
The VSI provides multiple ways to identify trend strength, reversals, and divergences:
VSI allows traders to customize parameters based on their trading style:
| Parameter | Description | Default Value |
|---|---|---|
length |
RSI period length | 13 |
addRsiX |
Volume-based RSI source (1=OBV, 2=ADL, 3=EFI, 4=PVT) | 1 |
smooth |
Smoothing factor for RSI | 2 |
size |
Histogram scaling factor | 10 |
volComp |
Histogram type (1=Volume Oscillator, 0=SMA) | 1 |
Adjusting these values helps traders fine-tune VSI to match different market conditions and asset volatility.
//------------------------------------------------------//
//PRC_VSI Volume Strength
//version = 0
//21.02.2025
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
//------------------------------------------------------//
// Input
//------------------------------------------------------//
length=13 // Length
addRsiX=1 // Relative Strength of 1=On Balance Volume 2=Accumulation/Distribution 3=Elders Force index 4=Price Volume Trend
smooth=2 // Smooth RSI
size= 10 // Histogram size
volComp=1 // Histogram companion 1=volume oscillator 0=Moving average
//------------------------------------------------------//
// RSI
//------------------------------------------------------//
myrsi=rsi[length](close)
sRsi=LinearRegression[smooth](myrsi)
if addRsiX=1 then
if close=close[1] then
src=0
elsif close>close[1] then
src=volume
elsif close<close[1] then
src=-volume
endif
CumSrc=cumsum(src)
rsix=rsi[length](CumSrc)
elsif addRsiX=2 then // Accumulation/Distribution
if close=high and close=low or high=low then
src=0
else
src=(2*close-low-high)/(high-low)*volume
endif
Cumsrc=cumsum(src)
rsix=rsi[length](CumSrc)
elsif addRsiX=3 then // Elders Force Index
src=average[length,1]((close-close[1])*volume)
rsix=rsi[length](Src)
elsif addRsiX=4 then // Price Volume Trend
src=(close-close[1])/close[1]*volume
Cumsrc=cumsum(src)
rsix=rsi[length](CumSrc)
endif
sRsix=LinearRegression[smooth](rsix)
//------------------------------------------------------//
// Volume Histogram
//------------------------------------------------------//
vAvg=average[length](volume)
rvAvg=average[length](volume*size/vAvg)
B=volume*(close-low)/(high-low)/vAvg*size
S=volume*(high-close)/(high-low)/vAvg*size
if volComp then
volx=(average[5,1](volume)-average[10,1](volume))/average[10,1](volume)*100
else
volx=rvAvg
endif
//------------------------------------------------------//
// Plot
//------------------------------------------------------//
volHist=volume/vAvg*size
if open>close then
if volume/vAvg*abs(size)>abs(rvAvg) then
r=239
g=83
b=80
a=255
else
r=120
g=123
b=134
a=25
endif
else
if volume/vAvg*abs(size)>abs(rvAvg) then
r=36
g=166
b=154
a=255
else
r=120
g=123
b=134
a=55
endif
endif
//------------------------------------------------------//
//Overbougth
drawhline(75)coloured("red")style(dottedline3)
drawhline(65)coloured("red")style(dottedline3)
colorbetween(75,65,"red",40)
// Middle
drawhline(50)coloured("grey")style(dottedline3)
//OverSold
drawhline(35)coloured("green")style(dottedline3)
drawhline(25)coloured("green")style(dottedline3)
colorbetween(35,25,"green",40)
//------------------------------------------------------//
return volHist coloured(r,g,b,a)style(histogram), volx coloured("orange"), srsi as "Relative Strength of price" coloured(142,21,153)style(line,2), srsix as "Relative Strength of Volume" coloured(0,188,212)style(line,2)
The VSI indicator is a powerful enhancement over traditional RSI, allowing traders to integrate volume dynamics into their analysis. By using VSI, traders can:
✅ Confirm RSI signals with volume strength.
✅ Identify divergences that indicate hidden buying or selling pressure.
✅ Adjust settings to adapt to different market conditions.
To maximize its potential, VSI can be combined with trend indicators like moving averages or Bollinger Bands to improve accuracy. Whether used for trend-following or reversal trading, VSI provides a deeper, more complete view of market momentum.