I have the following condition:
if (BarsSinceExit()==0 && something else)
right after the OnBarUpdate.
It works fine, but if I restart the strategy and there is an open position going on, on the next bar update after restarting, the condition is met.
It seems that BarsSinceExit() takes the value of zero as soon as there is an open position.
Is that correct?
Thanks

Comment