I've been battling with this one for a while but it's very intermittent. I'm basically trying to get the 1 tick bars for this session:
Bars myBars; Bars.Session.GetNextBeginEnd(DateTime.Now, out sessionBegin, out sessionEnd); DebugMessages("Get Bars for" + this.Instrument.FullName); myBars = NinjaTrader.Data.Bars.GetBars(Instrument, new Period(PeriodType.Tick, 1,MarketDataType.Last), sessionBegin, DateTime.Now, BarsArray[0].Session, false, false); DebugMessages("Bar Retrieve " + Instrument + " Start " + sessionBegin + " End " + DateTime.Now);
First - the request:
10/9/2013 7:59:59 AM|1|4|Bar Retrieve ZB 12-13 Globex Start 10/8/2013 6:00:00 PM End 10/9/2013 7:59:59 AM
Then the data returned
10/9/2013 7:59:59 AM|1|4|Bars From 10/9/2013 7:00:01 AM To 10/9/2013 7:59:57 AM Bars Total 2369
So I requested bars from 6pm on 8th October (Globex start) but I got data from 7am on 9th October.
When someone gets this problem, if they go to \My Documents\NinjaTrader 7\db and remove all data, then go restart Ninja, it usually fixes the issue.
Some days it works, some days it doesn't.
Is this data being requested from the data vendor in this case? Or is the data coming from Ninjas repository? The issue is intermittent but occurs with Zen, TT & Kinetick.
Any thoughts?
Pete
Comment