N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
J:3*K-2*D;
boll:MA(J,20),LINETHICK3;
UPPER:BOLL+2*STD(J,20);
LOWER:BOLL-2*STD(J,20);
IF(J>REF(J,1),J,DRAWNULL),COLORRED,LINETHICK2;
IF(J<REF(J,1),J,DRAWNULL)COLOR00BB00,LINETHICK2;