通達信你常用到的背離指標公式
基本概況:
- 指標類別: 通達信指標
- 授權(quán)方式: 免費版
- 指標評級: ★★★★★
- 指標語言: 簡體中文
- 指標來源: 互聯(lián)網(wǎng)
- 指標日期: 2017-08-12 00:00:00
內(nèi)容介紹:
通達信你常用到的背離指標公式:
中線: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)<C AND REF("MACD.DIF",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)<C AND REF("KDJ.K",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)<C AND REF("RSI.RSI1",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)<C AND REF("BIAS.BIAS1",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)<CLOSE;{股價趨勢}
TYP:=(HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
CDZB:=REF(CCI,DDSJ+1)<CCI;{CCI指標趨勢}
CCI底背離:=DDGJ AND CDZB;
CGZB:=REF(CCI,GDSJ+1)>CCI;
CCI頂背離:=GDGJ AND CGZB;
K值:="KDJ.K";
KDZB:=REF(K值,DDSJ+1)<K值;{KDJ.K指標趨勢}
K底背離:=DDGJ AND KDZB{ AND K超賣};
KGZB:=REF(K值,GDSJ+1)>K值;
K頂背離:=GDGJ AND KGZB;
MACD:="MACD.MACD";
MDZB:=REF(MACD,DDSJ+1)<MACD;{MACD指標趨勢}
M底背離:=DDGJ AND MDZB;
MGZB:=REF(MACD,GDSJ+1)>MACD;
M頂背離:=GDGJ AND MGZB;
RSI:="RSI.RSI1";
RDZB:=REF(RSI,DDSJ+1)<RSI;{RSI指標趨勢}
R底背離:=DDGJ AND RDZB;
RGZB:=REF(RSI,GDSJ+1)>RSI;
R頂背離:=GDGJ AND RGZB;
BIAS:="BIAS.BIAS1";
BDZB:=REF(BIAS,DDSJ+1)<BIAS;{BIAS指標趨勢}
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,1