double stopLimitOffsetLong = 0.05; orderLong = new OrderRecord { ThisUUID =ThisUUID, LimitPrice = entryPrice+(stopLimitOffsetLong),/// above entry StopPrice = entryPrice+(stopLimitOffsetLong*2), /// above entry StaticOrderSize = accountEntryQuantity, } EnterLongStopLimit(0,true,orderLong.StaticOrderSize,orderLong.LimitPrice,orderLong.StopPrice, orderLong.ThisUUID);
In the sim account, I get this:
Order,Order='39d3c02a54a441a7b8b9767730966eb4/SimAccount1' Name='9efa4' New state='Rejected' Instrument='MES MAR24' Action='Buy' Limit price=5095 Stop price=5096.5 Quantity=1 Type='Stop Limit' Time in force=GTC Oco='' Filled=0 Fill price=0 Error='Order rejected' Native error='Limit price can't be smaller than stop price.',
3/6/2024 12:05:00 AM,
Order,SimAccount1 Limit price can't be smaller than stop price. affected Order: Buy 1 StopLimit @ 5096.5 x 5095,
Why can't this work? It seems like the stop would get hit and then immediate place the limit order because the limit is now less than the buy stop? My goal is the catch the rising price, is there a better way?
Comment