LC := REF(CLOSE,1);
R:SMA(MAX(CLOSE-LC,0),9,1)/SMA(ABS(CLOSE-LC),9,1)*10;
K:=r-REF(r,1);
STICKLINE(k>REF(k,1) AND R<3 AND (k<0 OR REF(k,1)<0),3,5,2),colorred;
STICKLINE(k<REF(k,1)AND R>5.5,5,7,2),colorgreen;
x:=(k>REF(k,1) AND R<3.0 AND (k<0 OR REF(k,1)<0))*8;
y:=((k<REF(k,1)AND R>5.5)>0)*8;