I have searched the forum but could not find an answer. Maybe I was looking in the wrong places!
Why? is the sell code before the buy code in the template?
I am sure that there is a good reason.
Rick
Size:
Color:
I believe this is to prevent peeking into the future i.e. creating a Strategy that evaluates the results of a trade on the current bar that may (or may not) occur on the next bar. If you test a Position's active status before executing a trading signal, you avoid that.
Size:
Color: