Thank you for your reply.
Again, the better approach would be to combine the logic into a single strategy.
However, you could do something like this:
private void OnAccountItemUpdate(object sender, AccountItemEventArgs e) { // Print the name and order action of each order processed on the account foreach (Order order in myAccount.Orders) { string orderInstrument = order.Instrument.ToString(); string strategyInstrument = Instrument.FullName; if (order.OrderType == OrderType.StopLimit && orderInstrument.Contains(strategyInstrument)) { //replace this with whatever logic you want to use Print("A stop limit exists"); } } }
Please let us know if we may be of further assistance to you.
Leave a comment: