通达信实用背离指标公式_第1页
通达信实用背离指标公式_第2页
通达信实用背离指标公式_第3页
通达信实用背离指标公式_第4页
通达信实用背离指标公式_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、通达信实用背离指标公式来源:Internet,编辑:股旁网,2017-01-11MACD背离DIFF:EMA(CLOSE,12) - EMA(CLOSE,26);DEA:EMA(DIFF,9);MACD:2*(DIFF-DEA), COLORSTICK,DRAWABOVE;MACD金叉:=BARSLAST(REF(CROSS(DIFF,DEA),1);MACD死叉:=BARSLAST(REF(CROSS(DEA,DIFF),1);MACD上次金叉:=SUMBARS(REF(CROSS(DIFF,DEA),1),2);MACD上次死叉:=SUMBARS(REF(CROSS(DEA,DIFF),1

2、),2);MACD底背离MACD次低点:=LLV(DIFF,MACD金叉);MACD最低点:=LLV(DIFF,MACD上次死叉);MACD底背离:=REF(CLOSE,MACD金叉+1)CLOSE AND MACD次低点MACD最低点 AND CROSS(DIFF,DEA);DRAWLINE(MACD金叉=0,DEA,MACD底背离,DEA,0),COLORRED,LINETHICK2;MACD顶背离MACD次高点:=HHV(DIFF,MACD金叉);MACD最高点:=HHV(DIFF,MACD上次金叉);MACD顶背离:=REF(CLOSE,MACD死叉+1)CLOSE AND MACD次

3、高点MACD最高点 AND CROSS(DEA,DIFF);DRAWLINE(MACD死叉=0,DEA,MACD顶背离,DEA,0),COLORGREEN,LINETHICK2;红面积:SUM(MACD,BARSLAST(MACD0),COLOR0000FF,NODRAW;绿面积:SUM(MACD,BARSLAST(MACD0)*(MACD0),COLORFFFF00,NODRAW;AA:=ROUND(REF(绿面积,1)*100);BB:=ROUND(REF(红面积,1)*100);DRAWNUMBER(CROSS(0,MACD),0.04,ABS(BB),COLORMAGENTA;DRAW

4、NUMBER(CROSS(MACD,0),-0.01,ABS(AA),COLORGREEN;CCITYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14)/(0.015*AVEDEV(TYP,14);BOLLBOLL:=MA(CLOSE,20);UB:=BOLL+2*STD(CLOSE,20);LB:=BOLL-2*STD(CLOSE,20);KDJRSV:=(CLOSE-LLV(LOW,9)/(HHV(HIGH,9)-LLV(LOW,9)*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;PP:=CCI-160 AND

5、CLOSELB AND J160 AND J100;KDJ中J值在0-90间为黄色,小于0为绿色,大于90为红色显示J值和CCI值CCI值小于160且收盘价在BOLL下轨一下,J值小于20为红色箭头,CCI大于160且J值大于100为绿色箭头DRAWICON(QQ,0,2);DRAWICON(PP,0,1);KDJ金叉:=BARSLAST(REF(CROSS(J,D),1);KDJ死叉:=BARSLAST(REF(CROSS(D,J),1);KDJ上次金叉:=SUMBARS(REF(CROSS(J,D),1),2);KDJ上次死叉:=SUMBARS(REF(CROSS(D,J),1),2);K

6、DJ底背离AAA1:=BARSLAST(REF(CROSS(J,D),1);KDJ次低点:=LLV(J,AAA1);KDJ最低点:=LLV(J,KDJ上次死叉);KDJ底背离:=REF(CLOSE,AAA1+1)CLOSE AND KDJ次低点KDJ最低点 AND CROSS(J,D);DRAWTEXT(KDJ底背离,MACD,KDJ底),COLORRED;STICKLINE(KDJ底背离,MACD,0,2,0),COLORRED;KDJ顶背离BBB1:=BARSLAST(REF(CROSS(D,J),1);KDJ次高点:=HHV(J,AAA1);KDJ最高点:=HHV(J,KDJ上次金叉);

7、KDJ顶背离:=REF(CLOSE,BBB1+1)CLOSE AND KDJ次高点=REF(C,4);A2:=CREF(C,4);A3:=CREF(C,4) AND REF(A1,1);T:=BARSLAST(A3),NODRAW;M0:=(T=0 AND REFX(T=1 AND NOT(A2),1) OR (REFX(T=2 AND NOT(A2),2) OR (REFX(T=3 AND NOT(A2),3) OR (REFX(T=4 AND NOT(A2),4) OR (REFX(T=5 AND NOT(A2),5) OR (REFX(T=6 AND NOT(A2),6) OR (REF

8、X(T=7 AND NOT(A2),7) OR (REFX(T=8 AND NOT(A2),8);M1:=T=1 AND REFX(T=2 AND NOT(A2),1) OR (REFX(T=3 AND NOT(A2),2) OR (REFX(T=4 AND NOT(A2),3) OR (REFX(T=5 AND NOT(A2),4) OR (REFX(T=6 AND NOT(A2),5) OR (REFX(T=7 AND NOT(A2),6) OR (REFX(T=8 AND NOT(A2),7);M2:=T=2 AND REFX(T=3 AND NOT(A2),1) OR (REFX(T=

9、4 AND NOT(A2),2) OR (REFX(T=5 AND NOT(A2),3) OR (REFX(T=6 AND NOT(A2),4) OR (REFX(T=7 AND NOT(A2),5) OR (REFX(T=8 AND NOT(A2),6);M3:=T=3 AND REFX(T=4 AND NOT(A2),1)OR (REFX(T=5 AND NOT(A2),2) OR (REFX(T=6 AND NOT(A2),3) OR (REFX(T=7 AND NOT(A2),4) OR (REFX(T=8 AND NOT(A2),5);M4:=T=4 AND REFX(T=5 AND

10、 NOT(A2),1) OR (REFX(T=6 AND NOT(A2),2) OR (REFX(T=7 AND NOT(A2),3) OR (REFX(T=8 AND NOT(A2),4);M5:=T=5 AND REFX(T=6 AND NOT(A2),1) OR (REFX(T=7 AND NOT(A2),2) OR (REFX(T=8 AND NOT(A2),3);M6:=T=6 AND REFX(T=7 AND NOT(A2),1) OR (REFX(T=8 AND NOT(A2),2);M7:=T=7 AND REFX(T=8 AND NOT(A2),1);N0:=T=1 AND

11、REF(T=0 AND A3,1) AND A2;N1:=T=2 AND REF(N0,1) AND A2;N2:=T=3 AND REF(N1,1) AND A2;N3:=T=4 AND REF(N2,1) AND A2;N4:=T=5 AND REF(N3,1) AND A2;N5:=T=6 AND REF(N4,1) AND A2;N6:=T=7 AND REF(N5,1) AND A2;N7:=T=8 AND REF(N6,1) AND A2;WZD:=DEA;WZG:=DEA;DRAWTEXT(N6 AND NOT(M7),WZD,8),COLORGREEN;DRAWTEXT(N7,

12、WZG,9),COLORMAGENTA;B1:=CREF(C,4);B3:=CREF(C,4) AND REF(B1,1);T1:=BARSLAST(B3),NODRAW;M8:=(T1=0 AND REFX(T1=1 AND NOT(B2),1) OR (REFX(T1=2 AND NOT(B2),2) OR (REFX(T1=3 AND NOT(B2),3) OR (REFX(T1=4 AND NOT(B2),4) OR (REFX(T1=5 AND NOT(B2),5) OR (REFX(T1=6 AND NOT(B2),6) OR (REFX(T1=7 AND NOT(B2),7) O

13、R (REFX(T1=8 AND NOT(B2),8);M9:=T1=1 AND REFX(T1=2 AND NOT(B2),1) OR (REFX(T1=3 AND NOT(B2),2) OR (REFX(T1=4 AND NOT(B2),3) OR (REFX(T1=5 AND NOT(B2),4) OR (REFX(T1=6 AND NOT(B2),5) OR (REFX(T1=7 AND NOT(B2),6) OR (REFX(T1=8 AND NOT(B2),7);M10:=T1=2 AND REFX(T1=3 AND NOT(B2),1) OR (REFX(T1=4 AND NOT

14、(B2),2) OR (REFX(T1=5 AND NOT(B2),3) OR (REFX(T1=6 AND NOT(B2),4) OR (REFX(T1=7 AND NOT(B2),5) OR (REFX(T1=8 AND NOT(B2),6);M11:=T1=3 AND REFX(T1=4 AND NOT(B2),1)OR (REFX(T1=5 AND NOT(B2),2) OR (REFX(T1=6 AND NOT(B2),3) OR (REFX(T1=7 AND NOT(B2),4) OR (REFX(T1=8 AND NOT(B2),5);M12:=T1=4 AND REFX(T1=

15、5 AND NOT(B2),1) OR (REFX(T1=6 AND NOT(B2),2) OR (REFX(T1=7 AND NOT(B2),3) OR (REFX(T1=8 AND NOT(B2),4);M13:=T1=5 AND REFX(T1=6 AND NOT(B2),1) OR (REFX(T1=7 AND NOT(B2),2) OR (REFX(T1=8 AND NOT(B2),3);M14:=T1=6 AND REFX(T1=7 AND NOT(B2),1) OR (REFX(T1=8 AND NOT(B2),2);M15:=T1=7 AND REFX(T1=8 AND NOT(B2),1);N8:=T1=1 AND REF(T1=0 AND B3,1) AND B2;N9:=T1=2 AND REF(N8,1) AND B2;N10:=T1=3 AND REF(N9,1) AND B2;N11:=T1=4 AND REF(N10,1) AND B2;N12:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论