Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- study(title ="TheLark Volume Momentum",overlay=false)
- //•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//
- // //
- // VOLUME MOMENTUM BY THELARK //
- // ~ 2-18-14 ~ //
- // //
- // •/• //
- // //
- // https://www.tradingview.com/u/TheLark //
- // (please do not remove this heading) //
- // //
- //•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•/•//
- // For the momentum trader there are plenty of price momentum indicators,
- // here's one that tracks the volume's momentum. Rising momentum in both price and volume
- // is great for any momentum trader.
- // Add this to your chart, play with the settings, and maybe you'll notice something new!
- // Follow me on TradingView for more (and future) indicators/ ideas! ~ TheLark
- //inputs
- Length = input(14,minval=1)
- atype = input(1,minval=1,maxval=3,title="1=sma, 2=ema, 3=wma")
- mv = input(false, title="Multiply the volume?")
- cc = input(false,title="Change color?")
- //calc
- avg = atype == 1 ? sma(volume,Length) : atype == 2 ? ema(volume,Length) : wma(volume,Length)
- avgm = mv ? (avg - avg[Length]) * volume : (avg - avg[Length])
- //plot
- col = cc and avgm >= avgm[1] ? #0094FF : #FF006E
- plot(avgm,style=histogram,linewidth=5,color=col)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement