My unmanaged Limit Short order is getting filled at market.
All my print statements state there should be a limit short order placed at 21730 (the price where 10SMA/20SMA crossed). The order is filled on the bar after the cross at MARKET (21689.50).
Here's my code:
if (limitOrder == true) {
Print(Times[0][0] + " ------------- Entering a Limit Order at: " + shortLimit);
SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.Limit, Qty, 0, shortLimit, oco, "Short entry");
limitOrder = false;
} else {
SubmitOrderUnmanaged(0, OrderAction.SellShort, OrderType.StopMarket, Qty, 0, mktShortStop, oco, "Short entry");
}

Comment