MACD改成 通达信的
更多金钻指标股票技术讨论QQ群:966329692 技术讨论QQ群:220302856 技术讨论QQ群:39652085 如群满可换一个

编写要求:

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 < 0) AND (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 < MA(DIFF,2))),LINETHICK2,colorFFFFFF;IF((DIFF > DEA),DEA,DEA),LINETHICK2,color0000FF;PARTLINE(DEA,(DEA < MA(DEA,5))),LINETHICK2,colorFFFFFF;FILLRGN(diff,dea,diff>=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;
 

选股票看什么指标最好 >股票指标网