RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
MA1:=MA(C,5); MA2:=MA(C,60);
A:=CROSS(K,D) AND K<50 AND C>REF(O,1) AND C>O AND C>BBI AND C>MA2;
B:CROSS(K,D) AND K<50 AND C>REF(O,1) AND C>O AND C>MA1 AND C>MA2;