adaptation for Prorealtime v10.3 of the indicator change volume Big small of Tradingview.
in this version the average of the volume (60 by default) is configurable
REM VOLUME CHANGE BIG SMALL
//by theo233
//on platform Tradingview
//adapted for the platform Prorealtime v 10.3 by bolsatrilera
//@version=3
// Better Display of Volume change
// green candle : Big volume change
// red Candle : Small volume change
// Default for BTC m5
// Big volume are limited up to $limup% 5%
// Pump : Volume over $limgreen% 2%
// Flat : Very Small Volume under $limdo% 0.2%
// Adjust based on volatility / TF
// BTC/USD 1h : 4,2,0.25
period=60
limup = 5//step=0.1,title='Limit display up')
limgreen = 2 //step=0.1,title='Green if upper : Pump')
limdo = 0.2//step=0.01,title='Red if lower : Flat')
pvol =(volume/average[period](volume))//period en cuadro de variables = entero= 60 (por defecto)
vol60 = pvol
// Top Limit
if vol60<=limup then
vol60=vol60
else
vol60=limup
endif
// Bottom Limit + Boost
factdo = limup // Boost for display
if vol60<=limdo then
vol60Small = ( 1 * factdo * ( 1-(factdo*vol60)))
else
vol60Small = 0
endif
if vol60 <= 0 then
r=255
g=0
b=0
elsif vol60 <= limgreen then
r=128
g=128
b=128
else
r=0
g=128
b=0
endif
// Calculate Volume Change :
// Divide volume with average on long period : long can be 50 60 100
// VolumeChange= Volume/SMA(Volume,50)
// Then Filter Out when VC over a limit = 3, 5 , 10
// VolumeChange := VolumeChange > limit ? VolumeChange : 0
return vol60Small coloured(255,0,0)style(histogram) as "VCBS",vol60 coloured(r,g,b)style(histogram)as "VCBS",limgreen style (dottedline)as "2",limdo coloured(0,255,255)style(dottedline)as "0.2"