Hi,
to be sure that we are on the same page, please consider this example:
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
if (instrument.equals(Instrument.EURGBP) &&
(period.equals(Period.FIFTEEN_MINS) || period.equals(Period.ONE_HOUR))){
double maxValue = indicators.fractal(instrument, period, OfferSide.BID, 0, 2)[0];
double minValue = indicators.fractal(instrument, period, OfferSide.BID, 0, 2)[1];
Date time = new Date(bidBar.getTime());
if (period.equals(Period.FIFTEEN_MINS)){
console.getOut().println("FIFTEEN_MINS: "+maxValue+", "+minValue+" time: "+time);
}
if (period.equals(Period.ONE_HOUR)){
console.getOut().println("ONE_HOUR: "+maxValue+", "+minValue+" time: "+time);
}
}
}
Quote:
Please help me in resolving this issue and guide me as to why this occurs.
Min and Max values could match only when an indicator as input data gets flat bars. It happens every time when market is closed.
Are you still able to get such indicator values?