Event handler<OrderEventArgs> Account.OrderUpdate
What about when we associate a method to this event handler to capture all order updates within a strategy running on two charts with the same instrument?
Say i have this method defined in a strategy:
private void OnOrderUpdate(object sender, OrderEventArgs e)
{
NinjaTrader.Code.Output.Process(string.Format("Ord er.Name: {0} OrderId: {1} OrderState: {2}",
e.Order.Name, e.OrderId, e.OrderState), PrintTo.OutputTab1);
}
Is it possible to determine to which instance of the strategy running on both charts a specific order belongs?
Both instances will receive the same event or message without any possibility to know which chart submitted an order.
In this example, the chart to the left submitted an order but both instances of the strategy reported it in their own OnOrderUpdate event handler.
Comment