C AND REF("MACD.DIF",AA1+1)0;AA2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"">

常用到的背离指标通达信指标公式源码

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

结合你自己的指标抄底逃顶自由把握妖股不算

中线:18.5,COLORLIRED;

AA1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));

MACD底背离:=REF(C,AA1+1)>C AND REF("MACD.DIF",AA1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA")>0;

AA2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));

KDJ底背离:=REF(C,AA2+1)>C AND REF("KDJ.K",AA2+1)<"KDJ.K" AND

CROSS("KDJ.K","KDJ.D");

AA3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));

RSI底背离:=REF(C,AA3+1)>C AND REF("RSI.RSI1",AA3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2")>0;

AA4:=BARSLAST(REF(CROSS("BIAS.BIAS1","BIAS.BIAS2"),1));

BIAS底背离:=REF(C,AA4+1)>C AND REF("BIAS.BIAS1",AA4+1)<"BIAS.BIAS1" AND CROSS("BIAS.BIAS1","BIAS.BIAS2")>0;

CC1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));

MACD顶背离:=REF(C,CC1+1)"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF")>0;

CC2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));

KDJ顶背离:=REF(C,CC2+1)"KDJ.K" AND

CROSS("KDJ.D","KDJ.K")>0;

CC3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));

RSI顶背离:=REF(C,CC3+1)"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1")>0;

CC4:=BARSLAST(REF(CROSS("BIAS.BIAS2","BIAS.BIAS1"),1));

BIAS顶背离:=REF(C,CC4+1)"BIAS.BIAS1" AND CROSS("BIAS.BIAS2","BIAS.BIAS1")>0;

{CCI}

N:=60;

DD:=C=LLV(C,N);{60日最低点}

DDSJ:=BARSLAST(REF(DD,1));{上一低点时间}

DDGJ:=REF(CLOSE,DDSJ+1)>CLOSE;{股价趋势}

GD:=C=HHV(C,N);{60日最高点}

GDSJ:=BARSLAST(REF(GD,1));{上一高点时间}

GDGJ:=REF(CLOSE,GDSJ+1)

TYP:=(HIGH + LOW + CLOSE)/3;

CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));

CDZB:=REF(CCI,DDSJ+1)

CCI底背离:=DDGJ AND CDZB;

CGZB:=REF(CCI,GDSJ+1)>CCI;

CCI顶背离:=GDGJ AND CGZB;

K值:="KDJ.K";

KDZB:=REF(K值,DDSJ+1)

K底背离:=DDGJ AND KDZB{ AND K超卖};

KGZB:=REF(K值,GDSJ+1)>K值;

K顶背离:=GDGJ AND KGZB;

MACD:="MACD.MACD";

MDZB:=REF(MACD,DDSJ+1)

M底背离:=DDGJ AND MDZB;

MGZB:=REF(MACD,GDSJ+1)>MACD;

M顶背离:=GDGJ AND MGZB;

RSI:="RSI.RSI1";

RDZB:=REF(RSI,DDSJ+1)

R底背离:=DDGJ AND RDZB;

RGZB:=REF(RSI,GDSJ+1)>RSI;

R顶背离:=GDGJ AND RGZB;

BIAS:="BIAS.BIAS1";

BDZB:=REF(BIAS,DDSJ+1)

B底背离:=DDGJ AND BDZB;

BGZB:=REF(BIAS,GDSJ+1)>BIAS;

B顶背离:=GDGJ AND BGZB;

DRAWTEXT(ISLASTBAR,19,' CCI底背离'),LINETHICK2,COLORGREEN;

DRAWTEXT(CCI底背离,IF(ISLASTBAR,19,19),'I'),LINETHICK2,COLORGREEN; DRAWTEXT(ISLASTBAR,16,' RSI底背离'),LINETHICK2,COLORWHITE; DRAWTEXT(R底背离,IF(ISLASTBAR,16,16),'I'),LINETHICK2,COLORWHITE; DRAWTEXT(RSI底背离,IF(ISLASTBAR,16,16),'-'),LINETHICK2,COLORWHITE; DRAWTEXT(ISLASTBAR,13,' MACD底背离'),LINETHICK2,COLORMAGENTA; DRAWTEXT(M底背离,IF(ISLASTBAR,13,13),'I'),LINETHICK2,COLORMAGENTA; DRAWTEXT(MACD底背离,IF(ISLASTBAR,13,13),'-'),LINETHICK2,COLORMAGENTA; DRAWTEXT(ISLASTBAR,10,' KDJ底背离'),LINETHICK2,COLORRED; DRAWTEXT(K底背离,IF(ISLASTBAR,10,10),'I'),LINETHICK2,COLORRED; DRAWTEXT(KDJ底背离,IF(ISLASTBAR,10,10),'-'),LINETHICK2,COLORRED; DRAWTEXT(ISLASTBAR,7,' BIAS底背离'),LINETHICK2,COLORYELLOW; DRAWTEXT(B底背离,IF(ISLASTBAR,7,7),'I'),LINETHICK2,COLORYELLOW; DRAWTEXT(BIAS底背离,IF(ISLASTBAR,7,7),'-'),LINETHICK2,COLORYELLOW; DRAWTEXT(ISLASTBAR,4,' BIAS底背离'),LINETHICK2,COLORYELLOW; DRAWTEXT(ISLASTBAR,34,' BIAS顶背离'),LINETHICK2,COLORYELLOW; DRAWTEXT(B顶背离,IF(ISLASTBAR,34,34),'I'),LINETHICK2,COLORYELLOW; DRAWTEXT(BIAS顶背离,IF(ISLASTBAR,34,34),'-'),LINETHICK2,COLORYELLOW; DRAWTEXT(ISLASTBAR,31,' KDJ顶背离'),LINETHICK2,COLORRED; DRAWTEXT(K顶背离,IF(ISLASTBAR,31,31),'I'),LINETHICK2,COLORRED; DRAWTEXT(KDJ顶背离,IF(ISLASTBAR,31,31),'-'),LINETHICK2,COLORRED; DRAWTEXT(ISLASTBAR,28,' MACD顶背离'),LINETHICK2,COLORMAGENTA; DRAWTEXT(M顶背离,(ISLASTBAR,28,28),'I'),LINETHICK2,COLORMAGENTA; DRAWTEXT(MACD顶背离,(ISLASTBAR,28,28),'-'),LINETHICK2,COLORMAGENTA; DRAWTEXT(ISLASTBAR,25,' RSI顶背离'),LINETHICK2,COLORWHITE; DRAWTEXT(R顶背离,(ISLASTBAR,25,25),'I'),LINETHICK2,COLORWHITE; DRAWTEXT(RSI顶背离,(ISLASTBAR,25,25),'-'),LINETHICK2,COLORWHITE; DRAWTEXT(ISLASTBAR,22,' CCI顶背离'),LINETHICK2,COLORGREEN; DRAWTEXT(CCI顶背离,(ISLASTBAR,22,22),'I'),LINETHICK2,COLORGREEN;

{超买超卖}

K超买:="KDJ.K">=80 OR "KDJ.D">=80 OR "KDJ.J">=100;

K超卖:="KDJ.K"<=20 OR "KDJ.D"<=30 OR "KDJ.J"<0;

{RSI:="RSI.RSI1"; }

R超买:=RSI>=80;

R超卖:=RSI<=20;

C超买:="I">=100;

C超卖:="I"<=-100;

{BIAS:="BIAS.BIAS1";}

B超买:="BIAS.BIAS1">3.5 OR "BIAS.BIAS2">5;

相关文档
最新文档