Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=4
- //VonKR
- study(title="Pretty_Volume", shorttitle="Pretty_Volume", precision=0, format=format.volume, resolution="")
- showMA = input(true)
- VolAvgLenght = input(title="Average Periods", defval=50, minval=0, type=input.integer)
- HighRV = input(title="High Threshold", defval=1.4, minval=0)
- LowRV = input(title="Low Threshold", defval=0.6, minval=0)
- VolMa = sma(volume, VolAvgLenght)
- RelVol = volume / VolMa
- Palette = RelVol < LowRV ? color.yellow :
- RelVol < HighRV ? color.gray : open < close ? color.green : color.red
- plot(volume, color=Palette, style=plot.style_columns, title="Relative Volume")
- plot(showMA ? sma(volume,20) : na, style=plot.style_area, color=color.blue, title="Volume MA", transp=65)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement