For example supposed on a bar update, all the conditions are met and an order is open. Then on the next bar update which could be before the first order closed, the same conditions are met. Since an order is opened we don't want to have another one opened until the first one is closed.
I was thinking of setting a variable outside of OnBarUpdate that tracks whether an order is open, but I'm not sure how to determine if it closed.
Thanks!

Comment