Okay this is a problem that I noticed before but only now have managed to document it properly. I'm using reqMktData to get minute bars but it appears the completed bar prices changes over time. Almost always the price that you get immediately after the bar is complete will change at least over the next minute. The plot below illustrates the issue I'll check with IB support. Posting here for info and to see if anyone has seen this, or whether there is something I'm doing wrong. Frankly I'm losing my patience with IB TWS. Now looking at rebuilding my strategy in another platform...
So you are requesting the 1 minute bar with start time 08:46 and end time 08:47. And you keep on requesting this bar from 08:47:05 until 08:47:59. Each time the close price of that same bar is different. Is that what you are saying?
You might have exposed my ignorance here... I've assumed that to produce the 8:47 bar it uses prices from 8:46:00 to 8:47:00. In other words 8:47:00 is the last price used. However I think what you're saying is the 8:47 bar uses prices from 8:47:00 to 8:47:59 ?
Isn't reqMktData used to obtain tick data, not 1-minute bars, so you'd have to build your own 1-minute bars? Don't remember about IB but that's how most market data systems & APIs work. I was also confused by this, a long time ago.
Can you share the code of the request that you send? That will clarify whether the 08:47 is the starting time or ending time of the candlestick bar.
Ib's time stamps denote the open of the bar not the close. So the 08:47 time stamp when requesting historical 1-min bar prices is the bar that contains pricing between 08:47:00 and 08:47:59.999. Anyone can easily verify this also on IB's TWS chart. An hourly bar with time stamp 9pm includes data between 9 pm and 9:59:59.999pm. And I do not believe OP got his code right. There is no way that IB adjusts historical prices AFTER the bar closes. The 08:47 bar does not change after 08:48. No way, I use IB and its API every day. OP, care to explain? Its a bit weird that you throw such accusation at IB, essentially implying their entire historical pricing feeds are garbage. Pls post the exact request you make to IB and which data you get back.
Thanks. I think we're on the same page. In summary, if getting historical bars to current time, it will include the bar that hasn't been finalised.
Partly correct, the API allows you to specify whether you want the current (incomplete) bar to be included in your request or not. So, there is nothing wrong with IB, it was your misunderstanding of the standard definition (which IB uses) which is that a bar timestamp denotes the start of the bar. Very few others use a different definition, I think to remember DukasCopy. Reuters and Bloomberg both use the standard definition.