I'm trying to insert this code into a strategy to email me when an order is filled.
protected override void OnExecution(IExecution execution)
{
if (execution.Order != null && execution.Order.OrderState == OrderState.Filled)
{
SendMail(@"[email protected]", @"NT8 Buy Action", @"Buy Order Placed");
}
}
However when I compile I receive the following error message.
The type or namespace name ='IExecution' could not be found (are you missing a using directive or an assembly reference?) CODE CS0246
Can anyone advise me of what stupid thing I'm doing here thanks heaps.
I found the code on another thread, so not sure if it works for NT8
Comment