X1:=ABS(MA(C,60)/MA(C,20)-1)<0.02 OR ABS(MA(C,10)/MA(C,20)-1)<0.02;
X2:=ABS(MA(C,5)/MA(C,60)-1)<0.02 OR ABS(MA(C,10)/MA(C,5)-1)<0.02;
X3:=ABS(MA(C,5)/MA(C,20)-1)<0.02;
A:=CROSS(MA(C,5),MA(C,60)) OR CROSS(MA(C,20),MA(C,60));
XG1:=EXIST(A,4);
XG:=X1 AND X2 AND X3 AND XG1 AND C>=REF(H,1);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
B:=(DEA+DIF)/2-0.015;
W:=(DEA+DIF)/2+0.015;
F:=HHV((DEA+DIF)/2,15)-LLV((DEA+DIF)/2,15);
A1:=RANGE(DIF,B,W) AND RANGE(DEA,B,W) AND RANGE(REF(F,1),0,0.06);
A2:=EVERY(A1,21);
A3:=(A2 AND DIF<0 AND CROSS(DIF,DEA) AND (C>MA(C,60) OR C>MA(C,20)))*0.5;
A4:=XG AND EXIST(A2,3);
F2:=((SMA(MAX((C - REF(C,1)),0),7,1) / SMA(ABS((C - REF(C,1))),7,1)) * 100);
F3:=((SMA(MAX((C - REF(C,1)),0),13,1) / SMA(ABS((C - REF(C,1))),13,1)) * 100);
F4:=((BARSLAST((F3 < 23)) <= 3) AND CROSS(F2,F3));
F5:=((((CLOSE - MA(C,23)) / MA(C,20)) * 100) < -12.5);
AA:=F4 AND F5;
A5:A3 OR A4 AND C=HHV(C,17) OR AA;