Consider doing something like this on your order creation:
private int orderCounter;
private void makeOrder(Instrument instrument, Period period) throws JFException {
IBar bar = history.getBar(instrument, period, OfferSide.BID, 0);
for(IOrder order : engine.getOrders(instrument)){
if(order.getCreationTime() > bar.getTime()){
console.getOut().println("There is an order already opened within the current bar for "+instrument);
return;
}
}
console.getOut().println("active orders: " + engine.getOrders(instrument));
engine.submitOrder("order"+ ++orderCounter, instrument, OrderCommand.BUY, 0.001);
}