I am using the following code to cancel, both Prints are working and printed the same results. The order in SuperDOM is still there and it cannot be cancelled.
if (State == State.SetDefaults)
{
// Find our Sim101 account
lock (Account.All)
myAccount = Account.All.FirstOrDefault(a => a.Name == "Sim101");
foreach (Order order in myAccount.Orders)
{
Print (" 111111 order = " + order);
CancelOrder(order);
Print (" 222222 order = " + order);
}
}
Comment