ma5:=MA(CLOSE,5);
MA15:=MA(CLOSE,15);
MA30:=MA(CLOSE,30);
MA60:=MA(CLOSE,60);
离散量30:100*(MA5-(MA15+MA30)/2)/MA30,COLORBLUE,LINETHICK1;
离散量60:100*(MA5-(MA15+MA30+MA60)/3)/MA60,COLORGREEN;
粘合K:-2*(离散量30-离散量60),COLORWHITE,LINETHICK2;
粘合D:=ema(粘合K,3),COLORBLUE;
主升:BArslAST(crOSS(粘合K,粘合D))*(粘合K>粘合D),NODRAW,COLORCYAN;
粘合:=Abs(粘合K)+ABS(离散量60),COLORCYAN;
离差:(粘合K-离散量30)*(离散量30>REF(离散量30,1)),NODRAW;
CC:=粘合K-离散量30;
GZ1:=(ABS(粘合-粘合K)<3 AND 粘合K>粘合D) OR (粘合K>-0.5 AND 粘合K<1 AND 粘合K>粘合D) OR (CC>0 AND CC<2 AND 离散量30>REF(离散量30,1));
STICKLINE(GZ1,0,-1,0.8,1),COLORBLUE;
关注1:IF(GZ1,1,0),COLORBLUE,NODRAW;
VAR1:=IF(GZ1=1 AND 粘合K>REF(粘合K,1),1/ABS(粘合-粘合K),0);
GZ2:=IF(VAR1>10,10,IF(VAR1<0.5,0,IF(VAR1<1,1,VAR1)));
STICKLINE(GZ2>0,0,-GZ2,2,0),COLORLIMAGENTA;
关注2:IF(GZ2>0,1,0),COLORLIMAGENTA,NODRAW;
VAR3:=REF(离散量30,3)>=REF(离散量30,1) AND REF(离散量30,1)<=离散量30 AND (离散量30-粘合K<2) AND 主升>0;
STICKLINE(VAR3,粘合K+1,粘合K-1,1,0),COLORCYAN;
鸭嘴:IF(VAR3,1,0),COLORCYAN,NODRAW;
三金点:关注1+关注2+鸭嘴,NODRAW;
VAR4:=IF(离散量30<-5 AND REF(离散量30,2)>REF(离散量30,1) AND 离散量30>REF(离散量30,1),1,0);
STICKLINE(VAR4,离散量30+2,离散量30,1,0),COLORBLUE;
反弹:IF(VAR4,1,0),COLORBLUE,NODRAW;
0,COLORRED;0,COLORRED;
STICKLINE(鸭嘴,0,3,6,0),COLORLIMAGENTA;
STICKLINE(鸭嘴,3,6,4,0),COLORGREEN;
STICKLINE(鸭嘴,6,8,2,0),COLORBLUE;
DRAWTEXT(鸭嘴,7,'鸭嘴'),COLORCYAN;
STICKLINE(反弹,0,3,6,0),COLORBLUE;
STICKLINE(反弹,3,6,4,0),COLORGREEN;
STICKLINE(反弹,6,8,2,0),COLORWHITE;
DRAWTEXT(反弹,7,'反弹'),COLORCYAN;