Here is entry code:
EnterShortLimit(Instrument.MasterInstrument.Round2 TickSize(entry));
SetProfitTarget(CalculationMode.Ticks, ProfitTarget);
SetStopLoss(CalculationMode.Ticks, StopLoss);
I got filled:
1/27/2016 2:02:52 PM|1|32|Order='XXXXXXXXXX' Name='Buy' New state=Filled Instrument='YM 03-16' Action=Buy Limit price=16026 Stop price=0 Quantity=XX Type=Limit Filled=XX Fill price=16026 Error=NoError Native error=''
1/27/2016 2:02:52 PM|1|64|Instrument='YM 03-16' Account='XXXXXXXXXXX' Avg price=16026 Quantity=XX Market position=Long Operation=Insert Currency=UsDollar
But then my "SetStopLoss" got rejected immediately, because the market had moved below the intended price stop price before the order was sent through.
1/27/2016 2:02:52 PM|1|32|Order='XXXXXXXXXXXX' Name='Stop loss' New state=Rejected Instrument='YM 03-16' Action=Sell Limit price=0 Stop price=16001 Quantity=XX Type=Stop Filled=0 Fill price=0 Error=OrderRejected Native error='Sell order stop price must be below last trade price ExchangeRejectCode = 2060[]'
So, the question. Is there an order in which I can execute my "EnterShortLimit", "SetStopLoss" and "SetProfitTarget" to minimize this? The particular strategy I'm working on is meant to be turned off for news announcements like this, but I really wanted to see how it performed.
Just to give the full picture, the market moved (YM-03-16) from 16063 -> 16000 in less than a second, and my strategy was right in the middle of that move.
Cheers
Comment