Traders Laboratory - View Single Post - VWAP Indicator with 1SD and 2SD bands
View Single Post
  #3 (permalink)  
Old 08-03-2007, 06:22 PM
dbntina dbntina is offline
dbntina has no status.

 
Join Date: Mar 2007
Posts: 61
Thanks: 0
Thanked 9 Times in 4 Posts
Re: VWAP Indicator with 1SD and 2SD bands

Hi DbnTina,
I am not sure if the calculation for vi is correct.
In your EL you have used
variance_i = ((UpTicks[Value1]+DownTicks[Value1])/ShareW) * (Square(AvgPrice[i]-VolWAPValue));

where (UpTicks[i]+DownTicks[i]) represents volume of the bar [i]... I think in a probability calculation one should use total volume at price i, not just volume of the bar i. Lets ask Jerry for clarification.




NickM001,

You are correct. In the code, ShareW is always the total share volume up to the current time from your start. You divide the volume of the current bar by the total volume and use this "normalized volume" to multiply with according to Jerry. This should be correct if I am understanding the formula correctly. It also seems to line up with Jerry's bands so I think it is correct.

Let me know...I can correct if I am not suppossed to normalize this way...

Thanks for taking a look at the code if it is incorrect we want to find out now.

dbntina

Reply With Quote