VAR1:=EMA(CLOSE,7);
VAR2:=EMA(CLOSE,13);
L3:EMA(CLOSE,18);
VAR3:=EMA(CLOSE,34);
M1:EMA(EMA(EMA(L3,1),1),1),COLORGREEN,LINETHICK3;
IF(M1>=REF(M1,1),M1,DRAWNULL),COLORRED,LINETHICK3;
VAR4:=MAX(VAR1,VAR2);
VAR5:=MAX(VAR4,L3);
VAR6:=MAX(VAR5,VAR3);
VAR7:=MIN(VAR1,VAR2);
VAR8:=MIN(VAR7,L3);
VAR9:=MIN(VAR8,VAR3);
VAR10:=EMA(CLOSE,12)-EMA(CLOSE,26);
VAR11:=MA(VAR10,9);
VAR12:=IF(CROSS(VAR10,VAR11),1,0);
VAR13:=IF(REF(VAR10,1)<REF(VAR11,1) AND REF(VAR10,2)<REF(VAR11,2) AND REF(VAR10,3)<REF(VAR11,3) AND REF(VAR10,4)<REF(VAR11,4) AND REF(VAR10,5)<REF(VAR11,5) AND REF(VAR10,6)<REF(VAR11,6) AND REF(VAR10,7)<REF(VAR11,7) AND REF(VAR10,8)<REF(VAR11,8) AND REF(VAR10,8)<REF(VAR11,8) AND REF(VAR10,9)<REF(VAR11,9) AND REF(VAR10,10)<REF(VAR11,10),1,0);
VAR14:=IF(REF(VAR10,1)>0 AND REF(VAR10,2)>0 AND REF(VAR10,3)>0 AND REF(VAR10,4)>0 AND REF(VAR10,5)>0 AND REF(VAR10,6)>0 AND REF(VAR10,7)>0 AND REF(VAR10,8)>0 AND REF(VAR10,9)>0 AND REF(VAR10,10)>0,1,0);
VAR15:=IF((REF(VAR6,1)-REF(VAR9,1))/((REF(CLOSE,1)+REF(OPEN,1))/2)<0.1 AND (REF(VAR6,2)-REF(VAR9,2))/((REF(CLOSE,2)+REF(OPEN,2))/2)<0.1 AND (REF(VAR6,3)-REF(VAR9,3))/((REF(CLOSE,3)+REF(OPEN,3))/2)<0.1,1,0);
VAR16:=IF(VAR12+VAR13+VAR14+VAR15=4,1,0);
VAR17:=IF(DATE<=1991230,1,0);
VAR18:=VAR16=1 AND VAR17=1;