通达信MACD超级长趋势指标公式

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}
大行情:=NOT(REF(MACD120,1)=REF(MACD250,1)) AND MACD120=MACD250;
DRAWTEXT(XG,0,'↖金柱'),COLORYELLOW;
DRAWTEXT(大行情,0,'↖大牛启动'),COLORYELLOW;

相关文章