I think, history.getBars(...Filter.ALL_FLATS..) is broken.
This is sample strategy.
package jforex;
import com.dukascopy.api.*;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
import java.util.Locale;
public class TestTemp implements IStrategy {
public void onStart(IContext context) throws JFException {
IConsole console = context.getConsole();
IHistory history = context.getHistory();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss",Locale.US);
sdf.setTimeZone(TimeZone.getTimeZone("Europe/London"));
long lastBarStartTime = history.getStartTimeOfCurrentBar(Instrument.EURUSD, Period.ONE_HOUR);
Filter[] filters = {Filter.WEEKENDS, Filter.ALL_FLATS};
for(Filter filter: filters){
IBar LastBar = history.getBars(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.BID, filter, 1, lastBarStartTime, 0).get(0);
console.getOut().println("Bar's Volume: " + LastBar.getVolume());
console.getOut().println("Bar's StartTime: " + sdf.format(LastBar.getTime()));
console.getOut().println("Filter: " + filter);
}
context.stop();
return;
}
public void onAccount(IAccount account) throws JFException {
}
public void onMessage(IMessage message) throws JFException {
}
public void onStop() throws JFException {
}
public void onTick(Instrument instrument, ITick tick) throws JFException {
}
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
}
}
And, Result is this.

ALL_FLATS Filter did not working.
But, This case was working.

Why??
Best regards,