Please, try the attached code with the settings shown on the picture.
Why on historical data OnBarUpdate's and OnMarketData's data differ so much?
OnBarUpdate threadId: 10 2017-04-13 09:49:58.5620000 (Unspecified) 2334,5 Historical OnMarketData threadId: 10 2017-04-13 09:48:41.5970000 (Unspecified) 2334,5 Historical OnBarUpdate threadId: 10 2017-04-13 09:49:58.5620000 (Unspecified) 2334,75 Historical OnMarketData threadId: 10 2017-04-13 09:48:55.4490000 (Unspecified) 2334,75 Historical
If you set 'Tools->Options->General->Time zone' to UTC, you will see even more interesting things around move from Historical to Realtime (try Realtime too).
Comment