当前位置:牛股网 > 牛股宝 >

MACD改成 通达信公式的

  • 牛股宝
  • 2020-09-10 13:50
  • 牛股网

编写标准:DIFF:=((EMA(CLOSE,26) - EMA(CLOSE,12)) * -1);

DEA:=EMA(DIFF,9);

DEA1:=EMA(DIFF,18);

MACD:=(2 * (DIFF - DEA));

操盘:STICKLINE(((MACD >= 0) AND (MACD >= REF(MACD,1))),0,MACD,4,1),color0000FF;

减持:STICKLINE(((MACD >= 0) AND (MACD < REF(MACD,1))),0,MACD,4,0),colorFF00FF;

反跳:STICKLINE(((MACD = REF(MACD,1))),0,MACD,4,1),color00FFFF;

寻底:STICKLINE(((MACD < 0) AND (MACD < REF(MACD,1))),0,MACD,4,0),colorFFFF00;

IF((DIFF < 0),DIFF,0),LINETHICK2,color00FFFF;

IF((DIFF < DEA),DIFF,DEA),LINETHICK2,colorFFFFFF;

IF((DIFF < 0),0,DIFF),LINETHICK2,color0000FF;

PARTLINE(DIFF,(DIFF DEA),DEA,DEA),LINETHICK2,color0000FF;

PARTLINE(DEA,(DEA =dea),Color000044;

FILLRGN(diff,dea,diff

编写方式 :DIFF:=((EMA(CLOSE,26) - EMA(CLOSE,12)) * -1);

DEA:=EMA(DIFF,9);

DEA1:=EMA(DIFF,18);

MACD:=(2 * (DIFF - DEA));

操盘:IF(((MACD >= 0) AND (MACD >= REF(MACD,1))),MACD,0),COLOR0000FF,NODRAW;

减持:IF(((MACD >= 0) AND (MACD < REF(MACD,1))),MACD,0),COLORFF00FF,NODRAW;

反跳:IF(((MACD < 0) AND (MACD >= REF(MACD,1))),MACD,0),COLOR00FFFF,NODRAW;

寻底:IF(((MACD < 0) AND (MACD < REF(MACD,1))),MACD,0),COLORFFFF00,NODRAW;

IF((DIFF < 0),DIFF,0),LINETHICK2,COLOR00FFFF;

IF((DIFF < DEA),DIFF,DEA),LINETHICK2,COLORFFFFFF;

IF((DIFF < 0),0,DIFF),LINETHICK2,COLOR0000FF;

IF((DIFF < MA(DIFF,2)),DIFF,DRAWNULL),LINETHICK2,COLORFFFFFF;

IF((DIFF > DEA),DEA,DEA),LINETHICK2,COLOR0000FF;

IF((DEA < MA(DEA,5)),DEA,DRAWNULL),LINETHICK2,COLORFFFFFF;

DRAWBAND(DIFF,RGB(68,0,0),DEA,RGB(0,68,0));

STICKLINE(((MACD >= 0) AND (MACD >= REF(MACD,1))),0,MACD,1,1),COLOR0000FF;

STICKLINE(((MACD >= 0) AND (MACD < REF(MACD,1))),0,MACD,1,0),COLORFF00FF;

STICKLINE(((MACD < 0) AND (MACD >= REF(MACD,1))),0,MACD,1,1),COLOR00FFFF;

STICKLINE(((MACD < 0) AND (MACD < REF(MACD,1))),0,MACD,1,0),COLORFFFF00;

  • 关注微信

相关文章

微信公众号