Assumed the stratergy is simple. It is based on the RSI cross over. If crosses over 70 -> go short. If crosses under 30 -> go long.
My question: In this case will you use the shift1 for previous and shift0 for the current, or use the shift2 for previous and the shift1 for cirrent?
I've seen many codes and books. Some use the shift0 and shift1, but the other use shift2 and shift1.
The reason for using shift2 and the shift1 is: Since the shift0 will change tick after tick. At this tick it will cross over the threshold but in the next tick it will cross under the threshold. This will create many entry and exit signals. So it is better to use the shift2 and the shift1.