Hallo,
i have a question about the TakeProfit/StopLoss accuracy when submitting an Order with:
submitOrder(patternID, instrument, command, 0.01, 0, 0,history.getLastTick(instrument).getBid() - SL * instrument.getPipValue(), history.getLastTick(instrument).getBid() + TP * instrument.getPipValue()) ;
As illustrated in the picture, sometimes the Take Profit is missed although the a Tick would have validated the Filling.
(Small horizontal lines represent the Take Profit target - in the first case the StopLoss is hit, second shows proper behaviour)

Would it increase the likelyhood to be properly executed if i manually check the ticks in onTick()?
Hope i made myself clear -
greetings and thanks in advance!