N:=8;
M:=20;
GC1:=EMA((C+L+H)/3,6);
GC2:=EMA(EMA((C+L+H)/3,6),5);
FY1:=crOSS(GC1,GC2);
FY2:=COUNT(FY1,2)>0;
KUA:=100-100*(HHV(HIGH,5*N)-CLOSE)/(HHV(HIGH,5*N)-LLV(LOW,5*N));
CFL:=(vol/REF(VOL,1)>1 AND COUNT(CLOSE>OPEN,1)) OR (LOW>REF(HIGH,1) AND COUNT(OPEN>CLOSE,1) AND VOL/REF(VOL,1)>2);
ERC1:=CROSS(KUA,M) AND CFL AND CROSS(V,MA(V,5));
ERC2:=COUNT(BETWEEN(KUA,20,50),5)>=3 AND CROSS(KUA,50);
ERC3:=COUNT(BETWEEN(KUA,50,70),5)>=3 AND CROSS(KUA,70);
CROSS(MA(V,3),MA(V,5)) AND FY2 AND (ERC1 OR ERC2 OR ERC3);