大盘副图macd副图----无未来函数[通达信]
使用提示:这是将大盘的k线图和MacD引导到一张副图上。从而更加方便地将大盘与个股的K走势及MACD进行对比。这对走势分析和操盘都是很有用的。
指数:INDEXC,COLORYELLOW,NODRAW;
DRAWKLINE(INDEXH,INDEXO,INDEXL,INDEXC);
MA5:MA(INDEXC,5),COLORWHITE;
MA10:MA(INDEXC,10),COLORYELLOW;
MA20:MA(INDEXC,20),COLORRED;
kd:CONST(REF(INDEXC,1)),COLORGRAY;
DIF:=EMA(INDEXC,5)-EMA(INDEXC,13);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
STICKLINE(MACD>0,KD,KD+MACD,0,1),COLORMAGENTA;
STICKLINE(MACD<0,KD,KD+MACD,0,1),COLORGREEN;
DIF1:KD+DIF,COLORLIGRAY;
DEA1:KD+DEA,COLORBLUE;