difF:ema(CLOSE,24)-EMA(CLOSE,55),POINTDOT;
DEA:EMA(DIFF,18),POINTDOT;
macd:2*(DIFF-DEA),NODRAW;
STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,0.1,0),COLORWHITE;
STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,0.1,0),COLORFFC4FF;
STICKLINE(MACD>=REF(MACD,1) AND MACD<0,0,MACD,0.1,0),COLORFFFFBB;
STICKLINE(MACD<REF(MACD,1) AND MACD<0,0,MACD,0.1,0),COLORCYAN;
NOTEXTM:MACD,COLORLIMAGENTA;
金叉:=crOSS(DIFF,DEA);
死叉:=CROSS(DEA,DIFF);
DRAWICON(金叉,DEA,1);
DRAWICON(死叉,DEA,2);
A1:=BArslAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
NOTEXT底:DRAWLINE(A1=0,REF(DEA,1),底背离,DEA,0)COLORWHITE,LINETHICK2;{含未来}
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(C,A2+1)<C AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);
NOTEXT顶:DRAWLINE(A2=0,REF(DEA,1),顶背离,DEA,0),COLORCYAN,LINETHICK2;{含未来}
现价:=C,NODRAW;
均价:=SUM(C*V,240)/SUM(V,240),NODRAW;
涨力:=(现价/均价-1)*100,NODRAW,COLORBLACK;
TJ:=现价>均价 AND 涨力>=1;
DRAWICON(MACD=HHV(MACD,10) AND MACD>REFX(MACD,1) AND TJ AND MACD>0,MACD,23);{含未来};