SandroTurriate

VWAP Stdev Bands

1127
This indicator plots VWAP with 2x Standard Deviation bands. This could potentially be used to trade a mean reversion type strategy. Only works on intraday charts.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study("VWAP Stdev Bands", overlay=true)
devNum = input(2, title="Number of stdev")
newSession = iff(change(dayofweek), 1, 0)
vwapsum = iff(newSession, hl2*volume, vwapsum[1]+hl2*volume)
volumesum = iff(newSession, volume, volumesum[1]+volume)
v2sum = iff(newSession, volume*hl2*hl2, v2sum[1]+volume*hl2*hl2)
myvwap = vwapsum/volumesum
dev = sqrt(max(v2sum/volumesum - myvwap*myvwap, 0))
plot(myvwap, title="VWAP")
plot(myvwap + devNum * dev, title="VWAP Upper")
plot(myvwap - devNum * dev, title="VWAP Lower")