通达信跟庄MACD指标副图源码

 2023-12-21 21:53:29    通达信指标网  

N:=1.5;

M:=3;

P:=64;

DIFF:=EMA((EMA(CLOSE,N*12)-EMA(CLOSE,N*26))/EMA(CLOSE,N*26)*1000,M);

DEA:=EMA(DIFF,N*9),COLOR000088;

MACD:=2*(DIFF-DEA);

MACDX:=MACD;

MACDO:=EMA(MACD,5),COLORFF77FF;

DIFFO:=EMA(DEA,P)*1.8;

B:=MACD-REF(MACD,1);

(MACD>0 AND B>0,0,MACD,0,1),COLOR0000CD;

STICKLINE(MACD>0 AND B<0,0,MACD,0,0),COLOR0000CD;

STICKLINE(MACD<0 AND B>0,0,MACD,0,1),COLORCYAN;

STICKLINE(MACD<0 AND B<0,0,MACD,0,0),COLORCYAN;

STICKLINE(DIFF>DEA,DIFF,DEA,4,0),COLOR0089FF;

STICKLINE(DIFF<DEA,DIFF,DEA,4,0),COLORBLUE;

发现机构入场:IF(DIFF>=REF(DIFF,1) AND DEA<REF(DEA,1),DIFF,DRAWNULL),COLOR00C500,LINETHICK4;

短线出局:IF(DIFF<REF(DIFF,1) AND DEA>REF(DEA,1),DIFF,DRAWNULL),COLORYELLOW,LINETHICK4;

IF(DIFF>=REF(DIFF,1) AND DEA>REF(DEA,1),DIFF,DRAWNULL),COLORGRAY;

IF(DIFF<REF(DIFF,1) AND DEA<REF(DEA,1),DIFF,DRAWNULL),COLORBLUE;

IF(DIFFO>=REF(DIFFO,1),DIFFO,DRAWNULL),COLORYELLOW;

IF(DIFFO=REF(DIFFO,1),DIFFO,DRAWNULL),COLORYELLOW;

IF(DIFFO<REF(DIFFO,1),DIFFO,DRAWNULL),COLORMAGENTA;


  •  标签:  

原文链接:https://www.tdxzb.com/?id=2081

本文版权:如无特别标注,本站文章均为原创。

相关文章

服务热线

18020657357

微信客服

微信客服