In the OnBarUpdate method, I need to know how many times a SL order has been consecutively triggered.
When a position is exited differently (TP or time based) the counter should be reset to 0.
Apparently, the OnExecutionUpdate doesn't work in a backtest.
What would you suggest?
Thanks
Comment