VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=EMA(EMA(EMA(VAR1,4),4),4);
J:=(VAR2-REF(VAR2,1))/REF(VAR2,1)*100;
D:=MA(J,3);
K:=MA(J,1);
LX:=BARSLASTCOUNT(J<0);
T:=BARSLAST(CROSS(J<0,0.5));
T2:=BARSLAST(CROSS(J>0,0.5));
J>=REF(J,T+2) AND COUNT(J>=REF(J,T+2),T2+1)=1;