MA5:EMA(C,5),Color00FF00,DOTLINE;
PARTLINE(MA5,MA5>REF(MA5,1),rgb(255,150,0)),LINETHICK3,LAYER0;
DIF1:=WMA(CLOSE,5);
DIF2:=WMA(CLOSE,21);
MACD:WMA((3*DIF1-2*DIF2),3),ColorFF9900,DOTLINE,LAYER0;
PARTLINE(MACD,MACD>REF(MACD,1),rgb(255,0,0)),LINETHICK3,LAYER0;{MACD升势}
XP:=BARSLAST(DISPSTATUS=1)+1;
E:=llvall(llv(l,XP))*0.95;
DIFFk:=DIF1-DIF2;
DEAk:=WMA(DIFFk,8);
MACDk:=2*(DIFFk-DEAk);
STICKLINE(MACDk>0 AND MACDk>REF(MACDK,1),E+MACDk,E,6,0),Color0000FF;
STICKLINE(MACDk>0 AND MACDk<REF(MACDK,1),E+MACDk,E,4,0),ColorFF9900;
STICKLINE(MACDk<0,E+MACDk,E,4,0),ColorFF9900;
AH1:hhv(h,Xp),COLOR0077FF,DOTLINE;
AL2:llv(l,Xp),COLORFF9900,DOTLINE;
HLZ:(AH1+AL2)/2,COLOR00FFFF,DOTLINE;
下跌:LAST(AH1>H),PRECIS0 ,LINETHICK0;
上涨:LAST(Al2<L),PRECIS0 ,LINETHICK0;
DRAWTEXT(DISPSTATUS=2,AH1,'----【'+NUMTOSTRN(AH1,2)+'元:跌'+NUMTOSTRN((C-AH1)/AH1*100,1)+'%.'+NUMTOSTRN(下跌,0)+'天】---- '),ALIGN1,Color00FFFF,linethick3,LAYER0;
DRAWTEXT(DISPSTATUS=2,Al2,'----【'+NUMTOSTRN(AL2,2)+'元:涨'+NUMTOSTRN((C-AL2)/AL2*100,1)+'%.'+NUMTOSTRN(上涨,0)+'天】---- '),ALIGN1,VALIGN2,Color00ff00,linethick3,LAYER0;