Manually I can create them fine but programmically I get the below...
Getting this error:
Buy stop or buy stop limit orders can't be placed below the market. affected Order: Buy 1 StopLimit @ -2x3445.75.
The current market was 3444.50 which this stop limit order was above not below like the error states. The code I tried is below here.
stopOrder = myAccount.CreateOrder(chartTrader.Instrument, OrderAction.Buy, OrderType.StopLimit, OrderEntry.Manual, TimeInForce.Gtc, qty, StopLimitPrice, 0, ocoGuid.ToString(), "stopOrder", Core.Globals.MaxDate, null);
myAccount.Submit(new[] { stopOrder });
I tried the Stop Market Order example and it also throws this error. Link I looked at: https://ninjatrader.com/support/help...t8/?submit.htm
Regular Market and Limit Orders work fine for me...
entryOrder = myAccount.CreateOrder(chartTrader.Instrument, OrderAction.Buy, OrderType.Market, OrderEntry.Manual, TimeInForce.Gtc, qty, price, 0, ocoGuid.ToString(), "Entry", Core.Globals.MaxDate, null);
myAccount.Submit(new[] { entryOrder });
Comment