以下是通达信中期方向线(macd的dif)副图指标

SHORT:=9;
 LONG:=26;
 MID:=12;
 DIF日:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),LINETHICK4;
 DEA日:=EMA(DIF日,MID),LINETHICK4;
 MACD日:=(DIF日-DEA日)*2,COLORCYAN,{COLORSTICK};

DRAWBAND(DIF日,RGB(450,0,0),0,RGB(0,200,0));
 {DRAWBAND(DIF日,RGB(150,0,0),DEA日,RGB(0,150,0));}

 STICKLINE(MACD日>0 AND MACD日>=REF(MACD日,1),0,MACD日,1,0),COLOR0000FF;
 STICKLINE(MACD日>0 AND MACD日<REF(MACD日,1),0,MACD日,0,0),COLOR000066;
 STICKLINE(MACD日<0 AND MACD日<REF(MACD日,1),0,MACD日,0,0),COLOR00CC33,COLORCYAN;
 STICKLINE(MACD日<0 AND MACD日>=REF(MACD日,1),0,MACD日,1,0),COLOR006633,COLORCYAN;

DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),LINETHICK1;
 DEA:=EMA(DIF日,MID),COLOR00FFFF,LINETHICK1;
 MACD日1:(DIF-DEA)*2,COLORLIRED,LINETHICK1;
  MB:=EXPMA(DIF日,20),COLORWHITE;

超买线B:MB+1.65*STD(DIF日,10)COLORLIRED,LINETHICK3;
超卖线B:MB-1.65*STD(DIF日,10) COLORLIGREEN,LINETHICK3;

DEA日1:EMA(DIF日,MID),POINTDOT,COLORMAGENTA,LINETHICK5;

DIF3:MA(DIF日,3);

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。