VAR1:=MA(LOW,4)*0.998;
VAR2:=VAR1 REF(VAR1,1);
VAR3:=REF(VAR1,BARSLAST(VAR1 REF(VAR1,1)));
VAR4:=IF(VAR2,VAR1,VAR3);
VAR5:=SMA((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100,3,1);
VAR6:=SMA(VAR5,3,1);
VAR8:=3*VAR5-2*VAR6;
VAR9:=IF(CLOSE VAR4,VAR4,VAR1);
XG:crOSS(C,VAR9) AND COUNT(CROSS(VAR8,0),5)