通达信专攻MACD,本人多次测试的私有指标,真实准确率83%!
2018-03-05原创 编 辑:翔博软件
答:只需加微信:396950280申请加入爱公式VIP微信群即可,天天有更新!
公式源码:
DRAWGBK(C>0, RGB(40,120,20),RGB(00,00,00),0,0,1),LINETHICK2;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9),COLORGREEN,LINETHICK2;
MACD:(DIF-DEA)*2,COLORSTICK;
DIF1:EMA(CLOSE,8)-EMA(CLOSE,18),COLORYELLOW,LINETHICK2;
DEA1:=EMA(DIF1,8),COLORWHITE,LINETHICK2;
空中加油:IF(DIF>REF(DIF,1) AND DIF>=DEA AND REF(DIF,1)<=REF(DIF,2) AND REF(DIF,1)>=REF(DEA,1) ,1,0),NODRAW;
DRAWICON(空中加油=1,DIF,23);
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR00BBFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLOR00DDFF;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,0,0 ),COLOR00FFFF;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,2,0 ),COLOR0011EE;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,1,0 ),COLOR0033DD;
STICKLINE(MACD>=REF(MACD,1)AND MACD>0,0,MACD,0,0 ),COLOR0055FF;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORBB11BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORDD33BB;
STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,0,0 ),COLORFF55BB;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,2,0 ),COLORFFBB11;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,1,0 ),COLORFFDD33;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0,0 ),COLORFFFF55;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-0.18,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*1.1,13) ;
VAR0004:="MACD.DIF#WEEK"(6,13,5);
VAR0005:="MACD.DEA#WEEK"(6,13,5);
VAR0006:="MACD.MACD#WEEK"(6,13,5);
VAR7:="MACD.DIF#MONTH"(6,13,5);
VAR8:="MACD.DEA#MONTH"(6,13,5);
周金叉:IF(CROSS(VAR0004,VAR0005),0.3,0)LINESTICK, COLORRED,LINETHICK3;
月金叉:IF(CROSS(VAR7,VAR8),-0.5,0)LINESTICK, COLORYELLOW,LINETHICK3;
零轴金叉:IF(CROSS(VAR0004,0),0.2,0)LINESTICK,COLORGREEN,LINETHICK2;
0,LINETHICK3;
DRAWICON(CROSS(MACD,0),MACD,1);
DRAWICON(CROSS(DIF1,0),DIF1,1);
DRAWICON(CROSS(DIF,DEA),DIF,1);
DRAWICON(CROSS(DEA,DIF),DEA,2);
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
DRAWTEXT(低位金叉,-0.2,' 金叉'),COLORFFFFFF;
JCCOUNT1:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉1:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,-0.18,10,0),COLOR0042CC;
STICKLINE(二次金叉,0,-0.18,8,0),COLOR004FF2;
STICKLINE(二次金叉,0,-0.18,8,0),COLOR3375FF;
DRAWTEXT(二次金叉,-0.2,' 金叉二'),COLOR3375FF;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.13,10,0),COLORCECE00;
STICKLINE(底背离,0,0.13,4,0),COLORFFFF00;
STICKLINE(底背离,0,0.13,2,0),COLORFFFF44;
DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORFFFFFF,LINETHICK1;
DRAWTEXT(底背离,0.3,' 底背离'),COLORFFFF26;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK1;
通达信手机版公式导入方法
一、进入公式编辑器界面
1、点击进入公式编辑器
2、点击指标编辑,选择新建指标
二、按照上面所发布的指标公式源码,进行复制填写
1、填写公式名称、描述、指标说明,填好后点左上角公式按键
2、然后点公式,对公式源码进行复制黏贴
3、填好后,点击测试公式,通过后点击保存,公式编辑就结束了
三、进入主界面选择公式,即可使用。
1、点击进入指标选择
2、在指标选择中的用户指标栏,根据所需选择自编公式
特别提示:
选股预警指标编写 ,不同主流行情软件间指标转换。 请联系微信:396950280
一个聚百万原创指标公式圈子