通达信MACD超级指标公式

{使用说明:粉k注意买入、红k拉升、浅蓝下跌、粉k包黄心启动、红k包黄心局部顶、红k包深蓝心绝对顶部、浅蓝包黄心上下俩难、浅蓝包深蓝心下挫开始、粉k包深蓝心跌至基本到位!}

DIF:=EMA(CLOSE,18)-EMA(CLOSE,40);
DEA:=EMA(DIF,3);
MACD:=(DIF-DEA)*2;
MD:=MACD#DAY;
MW:=MACD#WEEK;
MM:=MACD#MONTH;
MS:=MACD#SEASON;
MACD1:EMA((MD+MW*7+MM*31+MS*94)/133,5) LINETHICK2 COLORYELLOW NODRAW;
STICKLINE(MACD1>0,MACD1,0,3,1),COLORRED;
STICKLINE(MACD1<0,MACD1,0,3,1),COLORCYAN;
MACD120:REF(MACD1/2,BARSLAST(MACD1=HHV(MACD1,120))),COLORRED,LINETHICK2;
MACD250:REF(MACD1/2,BARSLAST(MACD1=HHV(MACD1,250))),COLORWHITE,LINETHICK2;
XG:=NOT(REF(MACD120,1)=MACD120);
STICKLINE(XG,0,MACD1,2,0),COLORYELLOW;{画金柱 120}
STICKLINE(MACD1>=MACD250,MACD250,MACD1,2,0),COLORMAGENTA; {画粉柱 250}
A1:=NOT(REF(MACD120,1)=REF(MACD250,1)) AND MACD120=MACD250;
DRAWTEXT(XG,0,'↖金柱'),COLORYELLOW;
DRAWTEXT(A1,0,'↖金柱启动'),COLORYELLOW;

(0)

相关推荐