VAR1:=EMA(EMA(EMA(CLOSE,5),2),1);
AA:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1;
BB:=EMA(AA,13);
CC:=0;
VAR2:=AMOUNT/VOL/100;
VAR3:=MAX(ABS(HIGH-VAR2),ABS(VAR2-LOW));
VAR4:=ABS((OPEN+CLOSE)/2-VAR2);
VAR5:=5;
VAR6:=(VAR3+VAR4)/VAR2*50;
DD:=IF(CROSS(VAR6,VAR5),0.008,0);
XG:AA CC AND CROSS(AA,BB) AND CROSS(BB,REF(BB,1)) AND EMA(CLOSE,5) REF(EMA(CLOSE,5),1);