If i close the order in tick
public void onTick(Instrument instrument, ITick tick) throws JFException {
if (!instrument.equals(myInstrument)) {
return;
}
for (IOrder orderInMarket : engine.getOrders()) {
if ((orderInMarket.getInstrument() == myInstrument)) {
if (orderInMarket.getProfitLossInPips()<stopLoss*-1) orderInMarket.close();
if (orderInMarket.getProfitLossInPips()>profitTarget) orderInMarket.close();
}
}
}
But the submitting the order is depend from 15minutes bar.
How i can run Historical test?
Tick or 15 minutes