Advertisement
Guest User

Pretty Volume _VonKrieger

a guest
May 12th, 2021
514
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. //@version=4
  2. //VonKR
  3. study(title="Pretty_Volume", shorttitle="Pretty_Volume", precision=0, format=format.volume, resolution="")
  4. showMA = input(true)
  5. VolAvgLenght = input(title="Average Periods", defval=50, minval=0, type=input.integer)
  6. HighRV = input(title="High Threshold", defval=1.4, minval=0)
  7. LowRV = input(title="Low Threshold", defval=0.6, minval=0)
  8.  
  9. VolMa = sma(volume, VolAvgLenght)
  10. RelVol = volume / VolMa
  11.  
  12. Palette = RelVol < LowRV ? color.yellow :
  13. RelVol < HighRV ? color.gray : open < close ? color.green : color.red
  14.  
  15. plot(volume, color=Palette, style=plot.style_columns, title="Relative Volume")
  16. plot(showMA ? sma(volume,20) : na, style=plot.style_area, color=color.blue, title="Volume MA", transp=65)
  17.  
  18.  
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement