What are you trying to change?
If you are trying to change the price of an order, OCO would not be involved. The OCO is only specified when the order is submitted and cannot be changed.
Changing a price of an order does not involve the OCOID in anyway.
To change the price of an order set the StopPriceChanged or LImitPriceChanged of the order and use Account.Change().
myOrder.StopPriceChanged = stopOrder.StopPrice - 4 * stopOrder.Instrument.MasterInstrument.TickSize;
myAccount.Change(new Orders[] { myOrder } );
If you want to loop through orders, then you can add the orders to a List<Order> collection and loop through the collection.
myOrderList = new List<Order>();
myOrderList.Add(myAccount.CreateOrder());
myOrderList[index of order].StopPriceChanged = 100;
You mentioned you are getting a compile error. If you want help with the compile error, please provide the full error message (including the line numbers).
Comment