分时MACD(主图指标 源码)

[复制链接]
查看57 | 回复0 | 2022-6-28 02:25:02 | 显示全部楼层 |阅读模式

这是通达信分时主图指标,那位大师改成变色的就完美了,是macd上下柱的变色,

{分时MACD}
ZRS:=CONST(DYNAINFO(3)),NODRAW;
A1:=3.5*(EMA(CLOSE,48)-EMA(CLOSE,104))+ZRS,COLORLIMAGENTA;
A2:=EMA(A1,36),COLORLIBLUE;
MACD:=(A1-A2)*2+ZRS;
DRAWKLINE(H,O,L,C);
STICKLINE(A1>=A2,ZRS,MACD ,0,1),COLORRED;
STICKLINE(A1<A2,ZRS,MACD ,0,1),COLORCYAN;
C,COLORWHITE,LINETHICK2;
均价:SUM(V*C,0)/SUM(V,0),COLORGREEN,LINETHICK1;
IF(均价<=REF(均价,1),均价,DRAWNULL),COLORGREEN,LINETHICK3;
IF(均价>=REF(均价,1),均价,DRAWNULL),COLORYELLOW,LINETHICK3;
DRAWTEXT(CURRBARSCOUNT=4,均价,'均'),COLORYELLOW,LINETHICK3;
DRAWNUMBER(CURRBARSCOUNT=2,均价,均价),COLORYELLOW,LINETHICK3;
DRAWTEXT_FIX(1,0.000,1-0.05,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.0550,1-0.05,0,HYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0.1050,1-0.05,0,GNBLOCK),COLORYELLOW;


下面这个是k线用的请参考做成与分时主图一样的好了.谢
DIFIF1:=EMA(CLOSE,50) - EMA(CLOSE,55);
DEAEA1:=EMA(DIFIF1,50);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
DIFIF1,COLOR33FF33;
DEAEA1,COLORYELLOW;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED,LINETHICK2; 
弱:IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;
DRAWICON(CROSS(DIFIF1,DEAEA1) AND DIFIF1<0.01 AND DIFIF1>DEAEA1 ,DIFIF1,1);
翻红:DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);

201410722381537777.png

201410722381537777.png

201410722381250084.rar

2.57 KB, 下载次数: 0

售价: 2 金钱  [记录]  [购买]

201410722381250084.rar

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则