The suggestion in the post was that the method (pasted below) from the email execution script could be used for OnOrderUpdate "...but try OrderUpdateEventArgs instead"
When I tried that I got a compile error "The type or namespace name 'OrderUpdateEventArgs' could not be found (are you missing a using directive or an assembly reference?)" Any ideas on how to make this work would be much appreciated.
private void OnExecution(object sender, ExecutionUpdateEventArgs e)
{[INDENT]if (e.Execution.Order != null)[/INDENT][INDENT]{[/INDENT][INDENT=2]if (e.Execution.Order.OrderState == OrderState.Filled)
{[/INDENT][INDENT=3]this.SendMail(fromEmailAddress, toEmailAddress, "NinjaTrader Trade Confirmation", "Trade filled for: " + e.Execution.ToString());
return;[/INDENT][INDENT=2]}[/INDENT][INDENT] [/INDENT][INDENT=2]if (emailPartFilled && e.Execution.Order.OrderState == OrderState.PartFilled)
{[/INDENT][INDENT=3]this.SendMail(fromEmailAddress, toEmailAddress, "NinjaTrader Trade Confirmation", "Trade filled for: " + e.Execution.ToString());[/INDENT][INDENT=2]}[/INDENT][INDENT]}[/INDENT]
}

Comment