VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR2:=EMA(EMA(EMA(VAR1,4),4),4);
SJ:=(VAR2-REF(VAR2,1))/REF(VAR2,1)*100;
SD:=MA(SJ,2);
SK:=MA(SJ,1);
VAR4:=CROSS(SK,0);
VAR5:=CROSS(SK,SD) AND SK>0;
买二:=VAR4 OR VAR5;
N:=6;
VAR11:=(2*CLOSE+OPEN+HIGH+LOW)/5;
VAR22:=(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;
VAR33:=(EMA(VAR22,3)+EMA(VAR22,6)+EMA(VAR22,12)+EMA(VAR22,24))/4;
A1:= EMA(VAR33,2);
A2:= EMA(A1,2);
A3:= EMA(A2,2);
A4:= EMA(A3,2);
A5:= EMA(A4,2);
买进:=IF(CROSS(A1,A5),-1,-5);
XG:买二 AND 买进;
{通达信测试通过,复制可直接使用}
{{N: 1 20 6}
VAR1:=(2*CLOSE+HIGH+LOW+OPEN)/5;
VAR2:=EMA(EMA(EMA(VAR1,4),4),4);
SJ:=(VAR2-REF(VAR2,1))/REF(VAR2,1)*100;
SD:=MA(SJ,2);
SK:=MA(SJ,1);
VAR3:=(CLOSE-MA(CLOSE,N))/MA(CLOSE,N)*100;
VAR4:=(EMA(VAR3,3)+EMA(VAR3,6)+EMA(VAR3,12)+EMA(VAR3,24))/4;
VAR5:=CROSS(SK,0);
VAR6:=CROSS(SK,SD) AND SK>0;
A1:=EMA(VAR4,2);
A2:=EMA(A1,2);
A3:=EMA(A2,2);
A4:=EMA(A3,2);
A5:=EMA(A4,2);
{买进:= IF(CROSS(A1,A5),-1,-5);}
{买二:= VAR5 OR VAR6;}
CROSS(A1,A5) AND (VAR5 OR VAR6);