以下是同花顺macd正负能量副图源码
用法同macd
使用时请参考大盘,成交量,均线和其它指标。
欢迎使用和优化。
DI:=(EMA(CLOSE,12) – EMA(CLOSE,26))*200;
DE:=EMA(DI,9);
MACD:=2*(DI-DE);
RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*400-200;
STICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,8,0),colorred;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),MACD,0,8,0),colorblue;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),MACD,0,8,0),colorgreen;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,8,0),colormagenta;
Zero : 0;
gj:=MAX(C,O);
STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),color0000ff;
STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),colorffff00;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),colorff00ff;
STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),color00ff00;
L4:=LLV(gj,4);
H4:=HHV(gj,4);
A9:=(HIGH+LOW)/2;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CI:(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
C2:MA(CI,4);
C3:MA(CI,10),linethick1;;
FILLRGN(CI,C2,CI>C2,RGB(0,255,0,),CI<C2,colorblack);
FILLRGN(CI,C3,CI>C3,RGB(255,0,0,),CI<C3,colorblack);
FILLRGN(CI,C2,CI>C2,RGB(0,255,0,),CI<C2,colorgreen);
FILLRGN(CI,C3,CI>C3,RGB(255,0,0,),CI<C3,colorgreen);
DIF:EMA(CLOSE,12)-EMA(CLOSE,150);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
启动点:=MACD<0 AND MACD>REF(MACD ,1) AND REF(MACD ,1)<REF(MACD ,2)
AND REF(MACD ,2)<REF(MACD ,3)
AND REF(MACD ,3)<REF(MACD ,4);
STICKLINE(启动点,0.4,MACD,8,0),coloryellow;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR0000BB;
启动点A:0,coloryellow;
DRAWICON(启动点,2,11);
评论(0)