I am looking for a way to avoid user using CLOSE button during a strategy or an addon.
I had a first result using OnOrderUpdate on an addon, and if order.Name == “Close” and order.OrderState == OrderState.Initialized (I have tried any values) then order.Account.Cancel(new [ ] { order}).
It was running fine for days until… it wont again. I have tried anything, rollback my code change. Technically it is not my code issue. Then something changed into NT8.
So I am looking again how to do that. The issue is now the Account.OrderUpdate is called after the strategy is Disabled. (apparently from log/print).
Using : RealtimeErrorHandling.IgnoreAllErrors
Trying to intercept order during strategy and addon.
Using IsUnmanaged = true (but same with false).
Thanks