强弱界: 0,COLORWHITE;
DIF:=EMA(CLOSE,9)-EMA(CLOSE,18);
DEA:EMA(DIF,5),COLORYELLOW,LINETHICK2;
SDIF:IF(DEA,DIF,0),COLORRED,LINETHICK2;
D:=BACKSET(DIF REF(DIF,1),2);
RDIF:IF(D ,DIF,0),COLORCYAN,LINETHICK2;
顶部:HHV(EMA(DIF,5),20),COLORGREEN,LINETHICK2;
底部:LLV(EMA(DIF,5) ,20), COLORMAGENTA,LINETHICK2;
{买入提示}
DRAWTEXT(CROSS(SDIF,0),0,'上穿0轴'),COLORYELLOW;
DRAWTEXT(CROSS(SDIF,底部),底部,'上穿底部'),COLORGREEN;
DRAWTEXT(CROSS(SDIF,顶部),顶部,'全仓买'),COLORFF8800;
DRAWICON(CROSS(DEA,SDIF),DEA,6);
DRAWICON(CROSS(SDIF,强弱界),SDIF,23);
DRAWICON(CROSS(RDIF,强弱界),RDIF,26);
DRAWICON(CROSS(SDIF,顶部),SDIF,9);
DRAWICON(FILTER(DEA 底部 AND REF(DEA,1)=底部,5),底部,5);
DRAWICON(FILTER(SDIF=RDIF AND REF(SDIF,1)=RDIF,0),RDIF,27);
MH1:=MAX(DEA,顶部);
ML1:=MIN(DEA,顶部);
XG1:ML1=MH1, COLORRED,LINETHICK1;
DRAWTEXT(ISLASTBAR,XG1,'全仓'), COLORRED;
MH2:=MAX(SDIF,RDIF);
ML2:=MIN(SDIF,RDIF);
XG2:ML2=MH2,COLORBLUE ,LINETHICK2;
DRAWTEXT(ISLASTBAR,XG2,'做空'),COLORCYAN ;