I've created an button to buy at market and when filled, placed an OCO stop and target order. Here is the code that I use to place these orders in the OnExecutionUpdate event after the Buy order is filled.
profitOrder1 = account.CreateOrder(Instrument, OrderAction.Sell, OrderType.Limit, OrderEntry.Manual, TimeInForce.Day, e.Quantity, e.Price + pt1Ticks * TickSize, 0, e.ExecutionId, profit1Name, new DateTime(), null);
Print("Submit Stop");
account.Submit(new Order[] { stopOrder} );
Print("Submit Profit");
account.Submit(new Order[] { profitOrder1} );
When I use the "Buy Mkt" button from Chart Trader with ATM Strategy, the Profit Target go to status "Working" and is filled when price trade through it. See the screenprint for that as well.
I am currently testing both on Playback.
Why doesn't the limit order from my Add-on go to Working Status? Do I need to submit the orders differently?
Comment