Hello,
I'm trying to build a strategy where the entry order is via BUY STOP / SELL STOP oder. My problem is that my orders are filled in marketprice. For example, I use the following command to issue the Buy stop order:
myOrder = engine.submitOrder(label, myInstrument, OrderCommand.BUYSTOP, pos_size, 153.794,5);
In this moment the market price is 154.494. After the command is executed, I receive the following message in onMessage method:
ORDER_SUBMIT_OK - Order submitted order: OPENED BUYSTOP 0.002 @ 153.794so it seems that my order was accepted OK
The problem starts, when my order gets filled as the order is filled on market price and not on the desired stop price:
Message: ORDER_FILL_OK - Order filled order: FILLED BUY 0.002 @ 154.494 Any idea what am I doing wrong?