X1:=REF(CLOSE,1);
X2:=SMA(MAX(CLOSE-X1,0),6,1)/SMA(Abs(CLOSE-X1),6,1)*100;
ENTERLONG:=crOSS(X2,20);
X3:=CROSS(X2,20);
XG:CROSS(X2,20);
X1:=REF(CLOSE,1);
X2:=SMA(MAX(CLOSE-X1,0),6,1)/SMA(Abs(CLOSE-X1),6,1)*100;
ENTERLONG:=crOSS(X2,20);
X3:=CROSS(X2,20);
XG:CROSS(X2,20);