@LukeGeniol: Thanks again for posting, the SierraChart version comes very close to my own version. I would say that this confirms that the VWAP bands that can be downloaded in the NinjaTrader forum are false.
If the Sierra Chart version is not 100% identical, this can be attributed to the input. Some charting packages use the Close, other the Typical or Weighted series as input price. I used the typical price.
the VWAP (especially the bands) need time to be trained.
If you use a TU as minute early in the day (or even in the middle of the day) after a squeeze, only one bar long range may emerge bands as the recent volatility is too low. While on UTs other than minute, the volatility is progressive.
I really do not understand what you mean. The volume weighted average price can be correctly approximated on any type of chart, provided that the resolution of the chart is high enough. If you take a 30 min chart, it is obvious that the values will be false for the first few bars, that can be well some hours into the session.
Otherwise it makes no difference whether you display the VWAP on a 1-minute chart, a 50-tick chart or whatsoever, if you keep the resolution high enough. VWAP and all bands will show up identical on all types of high resolution charts.
The VWAP is just a volume weighted average price, the bands are just calculated from the volume-weighted variance of all trades. If you calculate it correctly, you will always get the same result. It does not depend on the chart or bar types.
Attached my chart for Silver, which is near-identical with the Sierra Chart version. The slight differences can be explained by the session start time, my template uses 8:25 AM EST.
First of all, the visual appearance is very similar. Now if you look at the values in the end of the session:
VWAP: 1092.88 / 1092.88 ok
Upper Band 1: 1097.32 / 1097.31 ok
UpperBand 2 : 1101.75 / 1101.75 ok
UpperBand 3: 1106.18/ 1106.18 ok
For trading purposes they are identical.
Test 2: VWAP on 1 minute and 15 minute chart
VWAP: 1092.88 / 1093.47 -> 2 ticks off
Upper Band 1: 1097.32 / 1097.19 -> 1 tick off
UpperBand 2 : 1101.75 / 1100.91 -> 3 ticks off
UpperBand 3: 1106.18/ 1104.63 -> 6 ticks off
Now this becomes critical. The lower resolution data is not enough to plot the VWAP bands with an accuracy as needed for trading. While the error for the VWAP is 1 or 2 ticks, it may easily become 6 ticks for the outer bands. This makes the bands unusable on the 15 min chart.
What can be done about it?
All VWAPs should be only used on smaller timeframe charts. In my experience a 3 or 5 min chart is the minimum resolution required.
The best solution however will be to code a multi-time frame indicator, which calculates the VWAP from high resolution data such as 1 min bars. It is not necessary to increase resolution to tick level, as this would only slow down the indicator, while improving accuracy by another 1/10 of a tick.
Test 3: VWAP on 1 min and 50 tick chart
VWAP: 1092.88 / 1092.86 ok
Upper Band 1: 1097.32 / 1097.33 ok
UpperBand 2 : 1101.75 / 1101.79 ok
UpperBand 3: 1106.18/ 1106.26 ok
As the test shows, the 1-minute VWAP is accurate enough, it calculates about 50-100 times faster than the 50 tick VWAP.
Charts for the three tests attached.
Last edited by Fat Tails; May 30th, 2011 at 11:07 AM.
The following 5 users say Thank You to Fat Tails for this post:
I just tested both the forum VWAP and my indicator with triple bands. For testing purposes I put the indicator
on a 1 minute chart with a lookback period of 65 days.
Forum indicator: Result displayed after 35 seconds
New indicator (Variance_Distance mode) displayed after 30 seconds
New indicator (Variance_Close mode) displayed after 27 seconds
I think that all these indicators are too slow. You need to use them with high resolution data to get appropriate results, and the processing of the arrays or the DataSeries objects slows them down considerably.
So the next task will be to imprive the algorithm to allow for faster display. Once the algorithm is there, it can also be used for a multi-timeframe indicator.