I have a multi-instrument strategy. I want to cancel an order by its OrderId (e.g. 'a001257ee0f1422f810a5cef1f1be612'):
public void CancelMyOrder(String orderId)
{
foreach (IOrder ord in Orders)
{
if (String.Equals(ord.OrderId, orderId, StringComparison.Ordinal))
{
CancelOrder(ord);
break;
}
}
}
But it doesn't cancels the order. Moreover, after the first attempt to call this function, it becomes unable to send new orders. I don't see any error in Output window, and nothing related to the cancel attempt in the Log tab.
Please advise

Comment