通達信KMCR頂底買賣指標公式
- 指標類別: 通達信指標公式
- 授權方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 超買超賣
- 畫線方法: 副圖
- 日期:2024-01-16 來源:互聯網
通達信KMCR頂底買賣指標公式:
N:=60;
K值:="KDJ.K";
DD:=C=LLV(C,N);{60日最低點}
DDSJ:=BARSLAST(REF(DD,1));{上一低點時間}
DDGJ:=REF(CLOSE,DDSJ+1)>CLOSE;{股價趨勢}
KDZB:=REF(K值,DDSJ+1)<K值;{KDJ.K指標趨勢}
K底背離:=DDGJ AND KDZB;
GD:=C=HHV(C,N);{60日最高點}
GDSJ:=BARSLAST(REF(GD,1));{上一高點時間}
GDGJ:=REF(CLOSE,GDSJ+1)<CLOSE;{股價趨勢}
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;
TYP:=(HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
CDZB:=REF(CCI,DDSJ+1)<CCI;{CCI指標趨勢}
C底背離:=DDGJ AND CDZB;
CGZB:=REF(CCI,GDSJ+1)>CCI;
C頂背離:=GDGJ AND CGZB;
REFLINE: -5,15,30,COLORBLACK;
DRAWTEXT(ISLASTBAR,29,'KDJ頂背離'),LINETHICK2,COLORRED;
DRAWTEXT(K頂背離,IF(ISLASTBAR,27.5,29),'(×)'),LINETHICK2,COLORRED;
DRAWTEXT(ISLASTBAR,26,'MACD頂背離'),LINETHICK2,COLORMAGENTA;
DRAWTEXT(M頂背離,(ISLASTBAR,24.5,26),'(×)'),LINETHICK2,COLORMAGENTA,;
DRAWTEXT(ISLASTBAR,22.1,'RSI頂背離'),LINETHICK2,COLORBLUE;
DRAWTEXT(R頂背離,(ISLASTBAR,20.5,22.1),'(×)'),LINETHICK2,COLORBLUE;
DRAWTEXT(ISLASTBAR,18.1,'CCI頂背離'),LINETHICK2,COLORGREEN;
DRAWTEXT(C頂背離,(ISLASTBAR,16.6,18.1),'(×)'),LINETHICK2,COLORGREEN,;
DRAWTEXT(ISLASTBAR,14.2,'CCI底背離'),LINETHICK2,COLORGREEN;
DRAWTEXT(C底背離,IF(ISLASTBAR,12,14.2),'(√)'),LINETHICK2,COLORGREEN;
DRAWTEXT(ISLASTBAR,10,'RSI底背離'),LINETHICK2,COLORBLUE;
DRAWTEXT(R底背離,IF(ISLASTBAR,8.5,10),'(√)'),LINETHICK2,COLORBLUE;
DRAWTEXT(ISLASTBAR,6,'MACD底背離'),LINETHICK2,COLORMAGENTA;
DRAWTEXT(M底背離,IF(ISLASTBAR,4.5,6),'(√)'),LINETHICK2,COLORMAGENTA;
DRAWTEXT(ISLASTBAR,3,'KDJ底背離'),LINETHICK2,COLORRED;
DRAWTEXT(K底背離,IF(ISLASTBAR,1.5,3),'(√)'),LINETHICK2,COLORRED;
通達信KMCR頂底買賣指標公式實例圖解: