My PC is on Thai Time - 12 hours ahead of EST, 13 hours ahead of Chicago.
As you can see I am using the CME Index Futures RTH session which starts at 9:30 am & it's Nov 19 here which is Nov 18 in Chicago.
The script I run (PDTestBars.cs). It finds the session start & end datetime, then requests 1 tick bars for that period.
It logs the returned data (NinjaScript Output zip file).
What I can see is the following messages:
Bars Request Begin 18/11/2016 21:30:00 End 19/11/2016 04:15:00 Trading Hours CME US Index Futures RTH, TimeZone (UTC-06:00) Central Time (US & Canada)
Which looks right the market does open at 21:30 local time. Then it tells me what bars it returned...
Got Bars From 17/11/2016 21:30:02 To 19/11/2016 00:25:00 Bars Process Total 56903
Which is a bit odd, it appears to have got bars a full 24 hours before my request. I then show the data... The first row:
Lower 0 : 17/11/2016 21:30:02 : 18/11/2016 21:30:00 O 2181.75 H 2181.75 L 2181.75 C 2181.75
'Lower' means it's before the requested DateTime - so it passes back a lot of rows I don't think I requested, which is OK.I can just ignore them. But.....
Lower 26858 : 18/11/2016 04:14:52 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Lower 26859 : 18/11/2016 04:14:52 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Lower 26860 : 18/11/2016 04:14:52 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Lower 26861 : 18/11/2016 04:14:52 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Lower 26862 : 18/11/2016 04:14:58 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Lower 26863 : 18/11/2016 04:14:58 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Lower 26864 : 18/11/2016 04:14:58 : 18/11/2016 21:30:00 O 2177.5 H 2177.5 L 2177.5 C 2177.5
Greater 26865 : 18/11/2016 23:00:00 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
Greater 26866 : 18/11/2016 23:00:00 : 18/11/2016 21:30:00 O 2179.25 H 2179.25 L 2179.25 C 2179.25
Greater 26867 : 18/11/2016 23:00:00 : 18/11/2016 21:30:00 O 2179.25 H 2179.25 L 2179.25 C 2179.25
Greater 26868 : 18/11/2016 23:00:01 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
Greater 26869 : 18/11/2016 23:00:01 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
Greater 26870 : 18/11/2016 23:00:01 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
Greater 26871 : 18/11/2016 23:00:01 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
Greater 26872 : 18/11/2016 23:00:01 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
Greater 26873 : 18/11/2016 23:00:01 : 18/11/2016 21:30:00 O 2179 H 2179 L 2179 C 2179
As you can see - it gets data all the way to the close (my time) which is 4:15am on the 18th (4:15pm EST on the 17th)
The next row it returns after that is at 18th at 23:00 my time or 11am EST. So it appears to have skipped data from 21:30 my time/9:30 EST.
The code is attached, as well as the results. I've tried this a number of ways but I just can't seem to get it to return the missing data.
Cheers
Pete
Comment