Hi, I’m trying to build an indicator that I can later use in a back test and auto trade that opens positions on the second occurrence of an RSI cross.
So when the RSI crosses above 30 once, the indicator shows 1, then if it dips below and crosses above again (without going above 70), it shows 2 (and I enter long).
If the RSI crosses above 30 once, it show 1, then goes over 70 and crosses back down the indicator shows -1.
Likewise in opposite direction entering short at -2. So I only want to open long when its crosses above 30 a second time and only open short when it crosses below 70 twice in a row without reaching below 30.
Hope that makes sense?
Thanks in advance