RSI 1:=SMA(MAX(CLOSE-LC,0),6, 1)/SMA(ABS(CLOSE-LC),6, 1)* 100;
RSI2:=SMA(MAX(CLOSE-LC,0), 12, 1)/SMA(ABS(CLOSE-LC), 12, 1)* 100;
RSI3:=SMA(MAX(CLOSE-LC,0),24, 1)/SMA(ABS(CLOSE-LC),24, 1)* 100;
RSI 1 & gt; Ref(rsi 1, 1) and ref(rsi 1, 1)>ref(rsi 1, 2) and ref(rsi 1, 2) <;
Ref(rsi 1, 3) and ref(rsi 1, 2) < =20;
I hope this helps.