PSY:=COUNT(CLOSE>REF(CLOSE,1),40)/40;
RSV:=(PSY-LLV(PSY,3))/(HHV(PSY,3)-LLV(PSY,3));
K:MA(RSV,3);
D:MA(K,9),COLORGREEN;
J:3*K-2*D;
DRAWICON(K=0 AND J<0 AND C<REF(C,1),J,1);
STICKLINE(K=0 AND D=0 AND J=0 AND C<REF(C,1),0.1,0.3,1,0),COLORYELLOW;
STICKLINE(K=1 AND D=1 AND J=1 AND C>REF(C,1),1.1,1.3,1,0),COLORGREEN;
IF(J<=REF(J,1),J,DRAWNULL),COLORGREEN,LINETHICK1;
IF(D<=REF(D,1),D,DRAWNULL),COLORLIRED,LINETHICK1;
STICKLINE(D>K AND K>J AND C<REF(C,1),D,J,0,0),COLORRED;
DRAWICON(D>K AND K>J AND NOT(K=0 AND J<0) AND C<REF(C,1),J,2);