I have no issue on order submission and NT will change the order price the first time but not on subsequent calls to change the order. I am wondering if after I change the order the first time the IOder Object changes and if I need to capture this new IOrder Object to subsequently change the order?
I use a private IOrder entryOrder to enter the order:
SubmitOrder(p+1, OrderAction.Buy, OrderType.Limit, BuyQty, BuyPX, 0, "", orderName);
I then capture the Order in a IOrderArry with the following code
OrderReference[p]=entryOrder;
I then use the following code to change the order which works the first time
if(OrderReference[p]!=null)
{if ((OrderReference[p].OrderAction==OrderAction.Buy || OrderReference[p].OrderAction==OrderAction.BuyToCover)
&& (OrderReference[p].OrderState==OrderState.Accepted || OrderReference[p].OrderState==OrderState.PartFilled||OrderReference[p].OrderState==OrderState.Working)
&& OrderReference[p].LimitPrice!=BuyPX)
{int BuyQty= (int)(OrderReference[p].Quantity);
ChangeOrder(OrderReference[p],BuyQty,BuyPX, 0);}
}
But it will not change the order subsequently
Note.. I Change the Order but am not capturing the IOrder again as I assumed that the IOrder Object remained the same. Is this the case? If not how do I get the new IOrder Object?

Comment