Advertisement
TheLark

TradingView Indicator: Volume Momentum

Feb 18th, 2014
1,402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. study(title ="TheLark Volume Momentum",overlay=false)
  2.  
  3. //•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//
  4. // //
  5. // VOLUME MOMENTUM BY THELARK //
  6. // ~ 2-18-14 ~ //
  7. // //
  8. // •/• //
  9. // //
  10. // https://www.tradingview.com/u/TheLark //
  11. // (please do not remove this heading) //
  12. // //
  13. //•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//
  14.  
  15. // For the momentum trader there are plenty of price momentum indicators,
  16. // here's one that tracks the volume's momentum. Rising momentum in both price and volume
  17. // is great for any momentum trader.
  18. // Add this to your chart, play with the settings, and maybe you'll notice something new!
  19. // Follow me on TradingView for more (and future) indicators/ ideas! ~ TheLark
  20.  
  21. //inputs
  22. Length = input(14,minval=1)
  23. atype = input(1,minval=1,maxval=3,title="1=sma, 2=ema, 3=wma")
  24. mv = input(false, title="Multiply the volume?")
  25. cc = input(false,title="Change color?")
  26. //calc
  27. avg = atype == 1 ? sma(volume,Length) : atype == 2 ? ema(volume,Length) : wma(volume,Length)
  28. avgm = mv ? (avg - avg[Length]) * volume : (avg - avg[Length])
  29. //plot
  30. col = cc and avgm >= avgm[1] ? #0094FF : #FF006E
  31. plot(avgm,style=histogram,linewidth=5,color=col)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement