Advertisement
JustUncleL

VZO

Nov 9th, 2017
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. //
  2. // @author LazyBear
  3. //
  4. // If you use this code in its original/modified form, do drop me a note.
  5. //
  6. study("Volume Zone Oscillator [LazyBear] updated by JustUncleL", shorttitle="VZO_LB")
  7.  
  8. length=input(20, title="MA Length")
  9.  
  10. dvol= high==low? 0.0 : sign(close-close[1])* (abs(open-close)/(high-low)) * volume
  11. dvma=ema(dvol, length)
  12. vma=ema( abs(dvol), length)
  13. vzo=iff(vma != 0, 100 * dvma / vma,0)
  14.  
  15. hline(60, color=red,linestyle=dotted)
  16. hline(40, color=gray,linestyle=dashed)
  17. hline(20, color=gray,linestyle=dashed)
  18. hline(0, color=black,linestyle=dotted)
  19. hline(-20, color=gray,linestyle=dashed)
  20. hline(-40, color=gray,linestyle=dashed)
  21. hline(-60, color=green,linestyle=dotted)
  22.  
  23. plot(vzo, color=vzo>=0?lime:maroon, linewidth=2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement