Here is an example given in the forum by NT
protected override void OnOrderUpdate(Order order, double limitPrice, double stopPrice, int quantity, int filled, double averageFillPrice, OrderState orderState, DateTime time, ErrorCode error, string nativeError)
{
// Handle entry orders here. The entryOrder object allows us to identify that the order
//that is calling the OnOrderUpdate() method is the entry order.
// Assign entryOrder in OnOrderUpdate() to ensure the assignment occurs when expected.
// This is more reliable than assigning Order objects in OnBarUpdate, as the assignment is not guaranteed to be complete if it is referenced immediately after submitting
And this in the NT reference examples
protected override void OnExecutionUpdate(Execution execution, string executionId, double price, int quantity, MarketPosition marketPosition, string orderId, DateTime time)
{
// Assign entryOrder in OnExecutionUpdate() to ensure the assignment occurs when expected.
// This is more reliable than assigning Order objects in OnBarUpdate, as the assignment is not guaranteed to be complete if it is referenced immediately after submitting
if (execution.Order.Name == "myEntryOrder" && execution.Order.OrderState == OrderState.Filled)
entryOrder = execution.order;
So which is it - or are they interchangeable? Or am I missing something?
thanks
Comment