hi Support,
I'm loading historical bars in stand alone 2.6.53. There is something strange with the range bars time:
Here are the last historical bars:
StartTime: 2012-02-02 01:30:00.0 EndTime: 2012-02-02 01:30:00.1 O: 1.31966 C: 1.31846 H: 1.31966 L: 1.31846 V: 7183.6875 FEC: 1
StartTime: 2012-02-02 01:45:00.0 EndTime: 2012-02-02 03:15:00.0 O: 1.31845 C: 1.3188 H: 1.3188 L: 1.3176 V: 32128.2475 FEC: 7
StartTime: 2012-02-02 03:30:00.0 EndTime: 2012-02-02 04:15:00.0 O: 1.31934 C: 1.31814 H: 1.31934 L: 1.31814 V: 16463.9375 FEC: 4
StartTime: 2012-02-02 04:15:00.1 EndTime: 2012-02-02 04:15:00.2 O: 1.31814 C: 1.31694 H: 1.31814 L: 1.31694 V: 0.0 FEC: 0
Please note that the start and end time are not back to back - there are gaps which doesn't make sense.
After the last historical bar I get the following from a live feed:
StartTime: 2012-02-02 04:30:00.0 EndTime: 2012-02-02 05:59:13.495 O: 1.31607 C: 1.31727 H: 1.31727 L: 1.31607 V: 14344.885 FEC: 1383
StartTime: 2012-02-02 05:59:13.869 EndTime: 2012-02-02 06:27:27.456 O: 1.31729 C: 1.31815 H: 1.31815 L: 1.31695 V: 2117.58 FEC: 1139
Note that there is a gap between the last historical bar and the first live bar of 15 minutes
Also note that the next live bar is ok and is back to back with the previous live bar.
Can you please explain what is the reason for the gaps between consecutive historical bars?
Can you explain if this is correct behavior and if we can use those bars or not?
Please explain why there is a gap between the last historical bar and the first live bar.
For you reference here is the code for loading 100 range bars from historical data:
List<IRangeBar> historicalRangeBars = null;
try{
//get the latest bar
IBar latestRangeBar = (IBar) context.getHistory().getRangeBar(instrument, offerSide, priceRange , 0);
//load all bars since then
historicalRangeBars = context.getHistory().getRangeBars(instrument, offerSide, priceRange, 100, latestRangeBar.getTime(), 0);
}catch (JFException e) {}