VWAP Standard Deviation "Bands"

Questions about MultiCharts .NET and user contributed studies.
User avatar
ernay
Posts: 14
Joined: 08 Jun 2020
Has thanked: 9 times

VWAP Standard Deviation "Bands"

Postby ernay » 09 Jul 2020

I'm using the VWAP indicator and want to get the standard deviation of the VWAP series, since the new session started.  I was trying to follow the bollinger band indicator example on getting standard deviation, but it doesn't work the same way.  Any suggestions or examples on how I can achieve this?

I'm using the "vwapResetSessions" class, so my VWAP will only reset on new sessions.  I'd like the standard deviation's reset to behave the same way.

Thanks!

intraday
Posts: 1
Joined: 11 Jul 2020

Re: VWAP Standard Deviation "Bands"

Postby intraday » 21 Jul 2020

Create a variable for a new "vwapResettable" / "vwapnonResettable" function class , use a "barcount" variable that you reset to 1 on each new VWAP period / day, increase the "barcount" at the close of each bar, calculate the standard deviation with "stdDev1.Value = vwapclassvar.price.StandardDeviationCustom(barcount, 1);" - that gives you 1 standard deviation, then add/subtract that to the VWAP for 1 stddev bands, and times by 2, 3, 4, 5 to get bands further out.


Return to “MultiCharts .NET”