N1:=40;
A:=(C+O+H+L)/4;
AA0:=MA(A,N1),LINETHICK3;//中
MA1:=MA(CLOSE,5), NODRAW;
MA2:=MA(CLOSE,10), NODRAW;
MA3:=MA(C,60), NODRAW,LINETHICK1;
转折线:=MA3, NODRAW,COLORCYAN;
顺势线:=MA(CLOSE,10), NODRAW;
MA20:=MA(C,20), NODRAW;
MA30:=MA(C,30), NODRAW;
ZD:=MA3>REF(MA3,1);//上行
ZK:=MA3<REF(MA3,1);//下行
ZD1:=MA2>REF(MA20,1);//上行
ZK1:=MA2<REF(MA20,1);//下行
KD:=CROSS (MA2,MA20) AND MA3>REF(MA3,1);
K0K:=CROSSDOWN(MA2,MA20) AND MA3<REF(MA3,1);
K1K:=CROSSDOWN(MA2,MA20) AND C<MA3;
K1D:=CROSS(MA2,MA20) AND C>MA3;
MA5:=MA(CLOSE,120), NODRAW;
AAS:=SMA(A,N1,1),LINETHICK2;//慢
AAE:=EMA(A,60),LINETHICK2;//快
VAR60:=(2*CLOSE+HIGH+LOW)/4;
VAR70:=LLV(LOW,13);
VAR80:=HHV(HIGH,13);
VAR90:=EMA((VAR60-VAR70)/(VAR80-VAR70)*100,13);
VARA1:=EMA(0.667*REF(VAR90,1)+0.333*VAR90,2);
FF:=ZIGZAG(VAR90,20,1),COLORWHITE,LINETHICK1;
AA:=CROSS(FF,REF(FF,1));//D
BB:=CROSS(REF(FF,1),FF);//K
DRAWTEXT(AA,L,'D'),COLORYELLOW,FONTSIZE30,VALIGN0;
DRAWTEXT(BB,H,'K'),COLORYELLOW,FONTSIZE30;