I tried to create order in an indicator
myEntryOrder= myAccount.CreateOrder(Instrument, OrderAction.Sell, OrderType.StopMarket, OrderEntry.Automated, TimeInForce.Day, 1, 0, 1400, "myOCO", "stopOrder", Core.Globals.MaxDate, null);
It passes compiling, but at run time, it gets error. Unhandled exception: Object reference not set to an instance of an object.
Does it fail at the "Instrument"?
But I think Instrument is an instance. because I tried to Print(Instrument.FullName); and it does print MNQ 03-22.

Comment