Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=2
- // @title Volume Weighted MA
- // @author LazyBear
- // List of my public indicators: http://bit.ly/1LQaPK8
- // List of my app-store indicators: http://blog.tradingview.com/?p=970
- //
- study("Volume Weighted MA [LazyBear]", overlay=true)
- src=input(close)
- lookback=input(10)
- ma(s,l) => sma(s,l)
- //vma = ma( volume*src, lookback ) / ma(volume, lookback)
- nm_=src*volume, nm=sum(nm_,lookback)
- vma=nm/sum(volume,lookback)
- plot(vma, color=blue, linewidth=2, title="Volume weighted MA")
Add Comment
Please, Sign In to add comment