the docs say that shift =0 returns the current bar, as generated from the ticks.
when calling the sma function(for example), with shift=1 to get one value
and then calling it again, with a time offset, one can verify that the last bar's value (given by getPrevBarStart function) indeed matches the call.
however , calling with shift=0 i get a value that is not available by the array form of the call.
when i try to call the getBarStart time and replace the array call to get the current - tick generated bar
I get an error saying the bar isn't formed yet.
is there a way to use the function that returns an array to get the current bar values too ?
long prevBarTime = history.getPrevBarStart(Period.TEN_SECS, tick.getTime());
double temp[] = indicators.sma(instrument, Period.TEN_SECS,
OfferSide.BID, IIndicators.AppliedPrice.HIGH, 5,
prevBarTime - 1000L * 10L * 9L, prevBarTime);
double temp0 = indicators.sma(instrument, Period.TEN_SECS,
OfferSide.BID, IIndicators.AppliedPrice.HIGH, 5, 0);