您的位置: 零点财经>股票公式>通达信指标公式> 通达信特色MACD指标公式源码详解

通达信特色MACD指标公式源码详解

2019-06-26 23:37:58  来源:通达信指标公式  本篇文章有字,看完大约需要27分钟的时间

通达信特色MACD指标公式源码详解

时间:2019-06-26 23:37:58  来源:通达信指标公式

学会这个方法,抓10倍大牛股的概率提升10倍>>

通达信特色MACD指标公式源码详解

0,LINETHICK2;

DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26),COLORFFFFFF,LINETHICK2;

DEA1:=EMA(DIFF1,9),COLORYELLOW,LINETHICK2;

MACD1:=2*(DIFF1-DEA1);

MACD2:=EMA(MACD1,5);

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3,0),COLOR000055;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.5,0),COLOR000077;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.5,0),COLOR000099;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLOR0000FF;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3,0),COLOR222222;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.5,0),COLOR444444;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.5,0),COLOR666666;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0,0),COLOR999999;

STICKLINE(MACD1<MACD2,0,MACD1,3,0),COLORA80000;

STICKLINE(MACD1<MACD2,0,MACD1,2.5,0),COLORB80000;

STICKLINE(MACD1<MACD2,0,MACD1,1.5,0),COLOREC1000;

STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORFF4600;

STICKLINE(MACD1<MACD2,0,MACD1,0,0),COLORFFAA00;

低位金叉:=CROSS(DIFF1,DEA1) AND DIFF1<-0.1;

STICKLINE(低位金叉,0,DIFF1,3,0),COLOR002222;

STICKLINE(低位金叉,0,DIFF1,2.5,0),COLOR006666;

STICKLINE(低位金叉,0,DIFF1,1.5,0),COLOR009999;

STICKLINE(低位金叉,0,DIFF1,1,0),COLOR00FFFF;

DRAWTEXT(低位金叉,0.2,' 低位金叉'),COLOR00FF88;

JCCOUNT:=COUNT(CROSS(DIFF1,DEA1),BARSLAST(DEA1>=0));

二次金叉:=CROSS(DIFF1,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,21)=1;

STICKLINE(二次金叉,MACD1,-0.01,3,0),COLOR440044;

STICKLINE(二次金叉,MACD1,-0.01,2.5,0),COLOR660066;

STICKLINE(二次金叉,MACD1,-0.01,1.5,0),COLOR990099;

STICKLINE(二次金叉,MACD1,-0.01,1,0),COLORFF00FF;

DRAWTEXT(二次金叉,DEA1*1.3,' 二次金叉'),COLORYELLOW;

A1:=BARSLAST(REF(CROSS(DIFF1,DEA1),1));

底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF1>REF(DIFF1,A1+1) AND CROSS(DIFF1,DEA1);

STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;

DRAWLINE(A1=0,DEA1,底背离,DEA1,0),COLORRED,LINETHICK1;

DRAWTEXT(底背离,0.03,' 底背离'),COLORFF00FF;

A2:=BARSLAST(REF(CROSS(DEA1,DIFF1),1));

顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF1,A2+1)>DIFF1 AND CROSS(DEA1,DIFF1);

DRAWLINE(A2=0,DEA1,顶背离,DEA1,0),COLORFF8800,LINETHICK1;

DRAWTEXT(顶背离,-0.02,' 顶背离'),COLORFFFF00;

DIFF:DIFF1,COLOR009922,LINETHICK2;

DEA:DEA1,COLORYELLOW,LINETHICK2;

ZT:=CROSS(DEA,DIFF);

LS0:=BARSLAST(ZT);

S1:=IF(1,LS0=1,ZT) AND IF(1,DIFF<DEA,0);

DRAWTEXT(S1 AND DIFF>0,DIFF*0.8,'1'),COLOR00FF00;

DRAWTEXT(S1 AND DIFF<0,DIFF*1.8,'1'),COLOR00FF00;

S3:=IF(3,LS0=3,ZT) AND IF(3,DIFF<DEA,0);

DRAWTEXT(S3 AND DIFF>0,DIFF*0.8,'3'),COLOR00FF00;

DRAWTEXT(S3 AND DIFF<0,DIFF*1.4,'3'),COLOR00FF00;

S5:=IF(5,LS0=5,ZT) AND IF(5,DIFF<DEA,0);

DRAWTEXT(S5 AND DIFF>0,DIFF*0.8,'5'),COLOR00FF00;

DRAWTEXT(S5 AND DIFF<0,DIFF*1.4,'5'),COLOR00FF00;

S8:=IF(8,LS0=8,ZT) AND IF(8,DIFF<DEA,0);

DRAWTEXT(S8 AND DIFF>0,DIFF*0.8,'8'),COLOR00FF00;

DRAWTEXT(S8 AND DIFF<0,DIFF*1.8,'8'),COLOR00FF00;

S13:=IF(13,LS0=13,ZT) AND IF(8,DIFF<DEA,0);

DRAWTEXT(S13 AND DIFF>0,DIFF*0.8,'13'),COLOR00FF00;

DRAWTEXT(S13 AND DIFF<0,DIFF*1.2,'13'),COLOR00FF00;

S21:=IF(21,LS0=21,ZT) AND IF(21,DIFF<DEA,0);

DRAWTEXT(S21 AND DIFF>0,DIFF*0.8,'21'),COLOR00FF00;

DRAWTEXT(S21 AND DIFF<0,DIFF*1.2,'21'),COLOR00FF00;

S26:=IF(26,LS0=26,ZT) AND IF(26,DIFF<DEA,0);

DRAWTEXT(S26 AND DIFF>0,DIFF*0.8,'26'),COLOR00FF00;

DRAWTEXT(S26 AND DIFF<0,DIFF*1.2,'26'),COLOR00FF00;

S29:=IF(29,LS0=29,ZT) AND IF(29,DIFF<DEA,0);

DRAWTEXT(S29 AND DIFF>0,DIFF*0.8,'29'),COLOR00FF00;

DRAWTEXT(S29 AND DIFF<0,DIFF*1.2,'29'),COLOR00FF00;

S34:=IF(34,LS0=34,ZT) AND IF(34,DIFF<DEA,0);

DRAWTEXT(S34 AND DIFF>0,DIFF*0.8,'34'),COLOR00FF00;

DRAWTEXT(S34 AND DIFF<0,DIFF*1.8,'34'),COLOR00FF00;

S55:=IF(55,LS0=55,ZT) AND IF(55,DIFF<DEA,0);

DRAWTEXT(S55 AND DIFF>0,DIFF*0.8,'55'),COLOR00FF00;

DRAWTEXT(S55 AND DIFF<0,DIFF*1.8,'55'),COLOR00FF00;

S68:=IF(68,LS0=68,ZT) AND IF(68,DIFF<DEA,0);

DRAWTEXT(S68 AND DIFF>0,DIFF*0.8,'68'),COLOR00FF00;

DRAWTEXT(S68 AND DIFF<0,DIFF*1.8,'68'),COLOR00FF00;

ZTJ:=CROSS(DIFF,DEA);

LSJ:=BARSLAST(ZTJ);

SJ1:=IF(1,LSJ=1,ZTJ) AND IF(1,DIFF>DEA,0);

DRAWTEXT(SJ1 AND DIFF>0,DIFF*1.2,'1'),COLORFFFFFF;

DRAWTEXT(SJ1 AND DIFF<0,DIFF*0.8,'1'),COLORFFFFFF;

SJ3:=IF(3,LSJ=3,LSJ) AND IF(3,DIFF>DEA,0);

DRAWTEXT(SJ3 AND DIFF>0,DIFF*1.2,'3'),COLORFFFFFF;

DRAWTEXT(SJ3 AND DIFF<0,DIFF*0.8,'3'),COLORFFFFFF;

SJ5:=IF(5,LSJ=5,ZTJ) AND IF(5,DIFF>DEA,0);

DRAWTEXT(SJ5 AND DIFF>0,DIFF*1.2,'5'),COLORFFFFFF;

DRAWTEXT(SJ5 AND DIFF<0,DIFF*0.8,'5'),COLORFFFFFF;

SJ8:=IF(8,LSJ=8,ZTJ) AND IF(8,DIFF>DEA,0);

DRAWTEXT(SJ8 AND DIFF>0,DIFF*1.2,'8'),COLORFFFFFF;

DRAWTEXT(SJ8 AND DIFF<0,DIFF*0.8,'8'),COLORFFFFFF;

SJ13:=IF(13,LSJ=13,ZTJ) AND IF(8,DIFF>DEA,0);

DRAWTEXT(SJ13 AND DIFF>0,DIFF*1.2,'13'),COLORFFFFFF;

DRAWTEXT(SJ13 AND DIFF<0,DIFF*0.8,'13'),COLORFFFFFF;

SJ18:=IF(18,LSJ=18,ZTJ) AND IF(8,DIFF>DEA,0);

DRAWTEXT(SJ18 AND DIFF>0,DIFF*1.2,'18'),COLORFFFFFF;

DRAWTEXT(SJ18 AND DIFF<0,DIFF*0.8,'18'),COLORFFFFFF;

SJ21:=IF(21,LSJ=21,ZTJ) AND IF(21,DIFF>DEA,0);

DRAWTEXT(SJ21 AND DIFF>0,DIFF*1.2,'21'),COLORFFFFFF;

DRAWTEXT(SJ21 AND DIFF<0,DIFF*0.8,'21'),COLORFFFFFF;

SJ26:=IF(26,LSJ=26,ZTJ) AND IF(26,DIFF>DEA,0);

DRAWTEXT(SJ26 AND DIFF>0,DIFF*1.2,'26'),COLORFFFFFF;

DRAWTEXT(SJ26 AND DIFF<0,DIFF*0.8,'26'),COLORFFFFFF;

SJ29:=IF(29,LSJ=29,ZTJ) AND IF(29,DIFF>DEA,0);

DRAWTEXT(SJ29 AND DIFF>0,DIFF*1.2,'29'),COLORFFFFFF;

DRAWTEXT(SJ29 AND DIFF<0,DIFF*0.8,'29'),COLORFFFFFF;

SJ34:=IF(34,LSJ=34,ZTJ) AND IF(34,DIFF>DEA,0);

DRAWTEXT(SJ34 AND DIFF>0,DIFF*1.2,'34'),COLORFFFFFF;

DRAWTEXT(SJ34 AND DIFF<0,DIFF*0.8,'34'),COLORFFFFFF;

SJ47:=IF(47,LSJ=47,ZTJ) AND IF(47,DIFF>DEA,0);

DRAWTEXT(SJ47 AND DIFF>0,DIFF*1.2,'47'),COLORFFFFFF;

DRAWTEXT(SJ47 AND DIFF<0,DIFF*0.8,'47'),COLORFFFFFF;

SJ55:=IF(55,LSJ=55,ZTJ) AND IF(55,DIFF>DEA,0);

DRAWTEXT(SJ55 AND DIFF>0,DIFF*1.2,'55'),COLORFFFFFF;

DRAWTEXT(SJ55 AND DIFF<0,DIFF*0.8,'55'),COLORFFFFFF;

SJ60:=IF(60,LSJ=60,ZTJ) AND IF(60,DIFF>DEA,0);

DRAWTEXT(SJ60 AND DIFF>0,DIFF*1.2,'63'),COLORFFFFFF;

DRAWTEXT(SJ60 AND DIFF<0,DIFF*0.8,'63'),COLORFFFFFF;

SJ68:=IF(68,LSJ=68,ZTJ) AND IF(68,DIFF>DEA,0);

DRAWTEXT(SJ68 AND DIFF>0,DIFF*1.2,'68'),COLORFFFFFF;

DRAWTEXT(SJ68 AND DIFF<0,DIFF*0.8,'68'),COLORFFFFFF;

DRAWICON(CROSS(MACD,0),MACD,1);

DRAWICON(CROSS(DIFF,DEA),DIFF,1);

DRAWICON(CROSS(DEA,DIFF),DEA,2);

阅读了该文章的用户还阅读了

热门关键词

相关阅读

为您推荐

移动平均线
股票知识
MACD
老丁说股
热点题材
KDJ指标
读懂上市公司
成交量
股票技术指标
股票大盘
分时图
股市名家
概念股
缠中说禅
强势股
波段操作
股票盘口
短线炒股
股票趋势
涨停板
股票投资
长线炒股
股票问答
股票术语
财务分析
炒股软件
上证早知道
经济学术语
期货
股票黑马
股票震荡市场
理财
炒股知识
散户炒股
外汇
炒股战术
港股
基金
黄金




































































































































































































































































































































































































































































































































































































































相关栏目推荐

栏目导航

友情链接

网站首页
股票问答
股票术语
网站地图

copyright 2016-2024 零点财经保留所有权 免责声明:网站部分内容转载至网络,如有侵权请告知删除 友链,商务链接,投稿,广告请联系qq:253161086

零点财经保留所有权

免责声明:网站部分内容转载至网络,如有侵权请告知删除