I hope you are doing well.
I have been successfully using the piece of code below OnBarUpdate to cancel orders in 1 strategy (let's call it Strat1) that I am using:
However, I realized that if I have more than one active strategy in the same account (for example Strat1 and Strat2), the code above will cancel all the open orders in Strat1 and Strat2.
I was wondering if there is a condition that i can add to just filter the orders in Account.Orders that are only related to Strat1?
Thank you in advance for your guidance!
Best,
Comment