DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:EMA(DIF,MID);
MACD:(DIF-DEA)*2,COLORSTICK;
买:STICKLINE(CROSS(DIF,DEA),DEA,0,2,0),COLORRED,LINETHICK1;
STICKLINE(CROSS(DIF,DEA),0,0.1,2,0),COLORFF9900,LINETHICK1;
DRAWTEXT(CROSS(DIF,DEA),0.3,' 买'),COLORFFFFCC;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1),COLORWHITE;
D:=SMA(K,3,1),COLORYELLOW;
J:=3*K-2*D,COLORFF00FF;
MM:=IF(MACD< 0,MACD,0);
JJ:=MM> REF(MM,1);
ZZ:=REF(JJ,1)=1;
准备:=(JJ AND ZZ)*DEA;
JH:=HHV(MAX(K,MAX(D,J)),250);
DH:=HHV(MAX(DIF,DEA),250);
SH:=INTPART(JH/DH)/2;
DIFF50:=SH*DIF+50,COLORFFFF00;
DEA50:=SH*DEA+50,COLORBLUE;
缩头:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)>REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)< REF(1.5*(DIFF50-DEA50),1),1,0);
杀多:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)> REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)
诱空:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);
阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),10,0);
DRAWTEXT(FILTER(杀多,3) AND 杀多,MACD+0.1,'杀多'),COLORFF00FF;
DRAWTEXT(FILTER(缩头,3) AND 缩头,MACD+0.1,'卖'),COLORFF00FF;
DRAWTEXT(FILTER(诱空,3) AND 诱空,MACD+0.1,'?洗'),COLOR00FF00;
{SHORT 2 200 3 LONG 2 200 16 MID 2 200 7};