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!
VWAP Standard Deviation "Bands"
Re: VWAP Standard Deviation "Bands"
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.