Hi,
how is it possible that an index can hold multiple values? I am using a 5m ES future chart and get multiple open and close prices per bar. Am I missing something?
I am looping over the default getDataSeries Method.
how is it possible that an index can hold multiple values? I am using a 5m ES future chart and get multiple open and close prices per bar. Am I missing something?
I am looping over the default getDataSeries Method.
Code:
public void onBarUpdate(DataContext ctx)
{
calculateValues(ctx);
}
@Override
protected void calculateValues(DataContext ctx)
{
int period=getSettings().getInteger(Inputs.PERIOD);
var series=ctx.getDataSeries();
clearFigures();
int endIndex=series.getEndIndex() - 1;
for (int i=0; (i <= endIndex); i++) {
double bar1open = series.getOpen(i + 1);
double bar0high = series.getHigh(i);
double bar0close = series.getClose(i);
double bar1close = series.getClose(i + 1);
...
}