DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
A:=DIF;
B:=DEA;
AA:=CROSS(A,B);
BB:=AA AND COUNT(AA,13)>1 AND LAST(A<0 AND B<0,13,0);
BB OR EXIST(BB,3);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
A:=DIF;
B:=DEA;
AA:=CROSS(A,B);
BB:=AA AND COUNT(AA,13)>1 AND LAST(A<0 AND B<0,13,0);
BB OR EXIST(BB,3);