The following call does return the wrong bars: history.getBars(InstrumentGBPUSD, Period.FOUR_HOURS, OfferSide.BID, Filter.ALL_FLATS, 2, 1308758400000[Wed 2011.06.22 16:00:00.000], 0);
called in onTick at tick.getTime() = 1308758400692[Wed 2011.06.22 16:00:00.692] (--> 1st tick of new 4H bar!)
does return bars [1308729600000[2011-06-22 08:00:00.000+0000] O: 1.62053 C: 1.61257 H: 1.62154 L: 1.61118 V: 36994.0, 1308744000000[2011-06-22 12:00:00.000+0000] O: 1.61256 C: 1.61297 H: 1.61488 L: 1.60928 V: 41717.0]
instead of: [1308744000000[2011-06-22 12:00:00.000+0000] O: 1.61256 C: 1.61297 H: 1.61488 L: 1.60928 V: 41717.0, 1308758400000[2011-06-22 16:00:00.000+0000] O: .... C: .... H: .... L: ...... V: ....]
This is most irritating as normally the correct bars are returned (or at least that is what we thought up to now...). It seems that only once in a while the wrong bars are returned. All the other calls in that historic run that have been done on the first tick of a new 4H bar and that we've checked have returned the correct bars. Nevertheless, working on wrong bar-values could lead to wrong trade signals.
Therefore for us this is a critical bug. At the moment we don't verify the shift of the returned bars, but assume that the history.getBars(..) call would return the bars we've asked for. If we can't take that for granted we would have to include a workaround checking every return of a getBars-call.
Please keep us updated on the status of this bug and the bug-fixing.
Thanks a lot! Best, RR.
PS: history.getBar(Instrument.GBPUSD, Period.FOUR_HOURS, OfferSide.BID, 0); called at the very same tick and from onTick(..) does return the correct bar: 1308758400000[2011-06-22 16:00:00.000+0000] O: 1.61297 C: 1.61297 H: 1.61297 L: 1.61297 V: 1.5
PPS: history.getBars(InstrumentGBPUSD, Period.FOUR_HOURS, OfferSide.BID, Filter.ALL_FLATS, 2, 1308758400000[Wed 2011.06.22 16:00:00.000], 1); again called on the same tick... does return: [1308744000000[2011-06-22 12:00:00.000+0000] O: 1.61256 C: 1.61297 H: 1.61488 L: 1.60928 V: 41717.0, 1308758400000[2011-06-22 16:00:00.000+0000] O: 1.61297 C: 1.61297 H: 1.61297 L: 1.61297 V: 1.5]
PPPS: history.getBars(InstrumentGBPUSD, Period.FOUR_HOURS, OfferSide.BID, Filter.ALL_FLATS, 1, 1308758400000[Wed 2011.06.22 16:00:00.000], 1); again called on the same tick... does return: [1308758400000[2011-06-22 16:00:00.000+0000] O: 1.61297 C: 1.61297 H: 1.61297 L: 1.61297 V: 1.5]
|