Hi, please check my Screenshots for yesterday 16th July: TWS vs. barchart.com (or any other chart engine) Stock: DNOW 1 Min Chart. 1. As you can see, the VWAP calculation is broken since one of the last TWS updates. barchart.com shows correct figures, TWS is calculation wrong. 9:30 AM >>> 1 Min candle (=15:30PM German time in my TWS screenshot) High: 9.75 Low: 9.54 Close: 9.54 correct calculation should be: (High + Low + Close) /3 9.75 + 9.54 + 9.54 = 9.61 TWS shows 9.685, which is wrong barchart.com shows 9.61, which is correct. You can check it for any other stock for 9:30AM. If you want to check it for a later candle, you need to calculate with Volume till that candle, additionally. 2. VWAP deviation: Also broken since one of the last TWS updates. the deviation for the first 1Min candle of the day, if the deviation is set to Intraday, has to be the same for UpperVWAP, VWAP and LowerVWAP. Its also correct in barchart.com with 9.61/9.61/9.61 Its wrong in TWS with 9.771/ 9.685/ 9.599 Can anyone confirm? Are there any TWS devs in this forum?? Regards, vms01
You're missing the point of the VW part of VWAP. It's not an average of the HLC data points. It's weighted against the actual trades that occur. Different sources might include different portions of the market (i.e. primary exchange versus tape, and different trade condtions included/excluded). Why not ask the sources to clarify how they do it? Then report back here with their responses.
Hi, thanks for the answer. But sry, you are wrong. I posted my example for 9:30 AM Intraday VWAP, because its the easiest way to explain the bug. For 9:30AM, on a 1 Min Intraday Chart VWAP, you can exclude the Volume. Its only (High + Low + Close) /3. From 9:31 till the rest of the day, you have of course to calculate with Volume to get the correct VWAP figure. So in my example TWS already calculates for 9:30 wrong as you can see. All sources (TWS, barchart.com, Tradingview, yahoo) have the same High, Low, Close price. And for the second bug with deviation, also for 9:30AM the deviation should be zero, as you can see in all other sources. TWS, with the new bug, somehow adds/calculates with deviation for the first candle. That's incorrect.
A broken clock is correct twice a day too. I'm sorry but your VWAP formula is completely wrong. Try again.
NO!, Please read again and compare my screenshots. Like I said, to make it simple I compared only 9:30 AM, which is already wrong. For 9:30 you don't need to calculate with Volume. For 9:30 AM and the INTRADAY VWAP you can use VWAP = WAP I know the VWAP formula: VWAP = (WAP * Volume) / ∑Volume You have to use it for all candles after 9:30 AM but not for 9:30AM, because the ∑Volume figure and Volume is the same.
It's using data from EACH TRADE - i.e. price * volume. So, if there were 5 trades on within a 1 min period: $30 * 100 $30.01 * 200 $30.50 * 100 $30.60 * 10000 Your calc is: VWAP = ($3000 + $6002 + $3050 + $306000) / (100+200+100+10000) VWAP = 318052 / 10400 VWAP = 30.5819 Same applies for any other 1 minute period throughout the day. Note that some trade conditions and/or venues may be excluded for the purposes of calculating VWAP. Ask your vendor which they use.
Thank you for the answer and clarification. You are right, I´ve checked the Times and sales for the first minute and it´s as you mentioned. TWS calculates for every candle each trade made, so its very granular counting every trade and leads to a different figure compared to all the other chart engines out there, which calculate more rough with (High + Low + Close) /3 and Volume per candle. Any ideas for the second problem with VWAP deviation? Here I´m sure its a bug which came with one of the June updates. Before June VWAP deviation was correct. Like I mentioned, the VWAP deviation starts already wrong with the first candle 9:30AM when you look e.g. at 1 Min Charts. There can´t be any deviation in the first candle, but TWS charts always starts with one, although its set to Intraday.
No ideas regarding second problem >>>>> "VWAP deviation" change/bug since June update???? Are there any IB devs here?