Have been running some tests using TWS API to get price bars. Tried a few variations including the 5 second realtime bar: http://interactivebrokers.github.io/tws-api/realtime_bars.html In all cases there is a 5-6 second lag before the latest bar is available. Does this have anything to do with my account not being a pro account? Or is it just the time required for IB to assemble the bar data? Even using live market data, i.e. current ask/bid/last prices had significant delays.
Noticed that it's not uncommon for the streaming last price to lie outside the corresponding low/high prices of the bar chart. However it lies within the low/high of the next bar.
what server are you connected to? What do you trade? https://ibkr.info/article/2816 in the second box you have all the server addresses. Ping them and then decide if you have to change the server you are connected to.
Pinged all the TWS servers. Worst case was only 0.5 secs, well short of the lag I'm seeing. If you're using live streaming I take it you are not seeing this kind of lag?
Use a demo of a third party charting package fed by the IB api such as www.multicharts.com www.linnsoft.com www.medvedtrader.com www.serrachart.com www.ninjatrader.com www.motivewave.com to see if you get a delay via the api. Maybe it is just IB TWS mosaic charts.