大智慧大盘MACD副图指标源码[大智慧公式]
[p=30, 2, left][b]大智慧大盘MACD副图指标源码----无未来函数[通达信][/b][/p][p=30, 2, left][b]使用提示:这是将大盘的K线图和MACD引导到一张副图上。从而更加方便地将大盘与个股的K走势及MACD进行对比。这对走势分析和操盘都是很有用的。[/b][/p]
[p=30, 2, left][b]源码:[/b][/p]
[p=30, 2, left][b][code]
指数: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;
[/code]
[/b][/p]
页:
[1]