Dear Support,
I would like to report an issue.
Following snippet issues a STOP (LIMIT) order - it is a stop order with 12 pips slippage.
public void openDummyTrade(IContext context) throws JFException {
Instrument ins = Instrument.EURUSD;
ITick tick = context.getHistory().getLastTick(Instrument.EURUSD);
double stopEntryPrice = tick.getBid() + 25.0 * ins.getPipValue();
double amount = 1.0;
double slippage = 12.0;
stopEntryPrice = (new BigDecimal(stopEntryPrice)).setScale(ins.getPipScale()+1, BigDecimal.ROUND_HALF_UP).doubleValue();
context.getEngine().submitOrder("STOP" + System.currentTimeMillis(),
Instrument.EURUSD,
OrderCommand.BUYSTOP,
amount,
stopEntryPrice,
slippage);
}
This is what can be seen in the orders tab:
Now, when I change order's open price using IOrder#setOpenPrice() the order's type changes from
STOP (LIMIT) to
STOP and information about slippage gets lost. This is what can be seen in the orders tab after the operation.
Please, could you provide a fix in upcoming release?
Thank you & best regards,
Grzegorz