KDJ多周期通达信公式 副图 源码附图

N:=9; P1:=3; P2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,P1,1);
D:SMA(K,P2,1);
J:3*K-2*D;
DRAWICON(CROSS(K,D),K,1);
DRAWICON(CROSS(D,K),D,2);
X1:KD.K#MONTH;
X2:=KD.D#MONTH;
X3:=KD.K#WEEK;
X4:=KD.D#WEEK;
X5:=KD.K#SEASON;
X6:KD.D#SEASON;
 
Y1:X1>X2;
Y2:X2>X1;
Z1:=X3>X4;
Z2:=X4>X3;
J1:X5>X6;
J2:X6>X5;
R1:=K>D;
R2:=D>K;
R3:=K<20;
R4:=K>=20 AND K<50;
R5:=K>=50 AND K<80;
R6:=K>=80;
 
YTD1:=STRCAT('',IF(Y1,'月KD金叉',' '));
DRAWTEXT_FIX(1,0.1,0.00,0,YTD1),COLORRED;
YTD2:=STRCAT('',IF(Y2,'月KD死叉',' '));
DRAWTEXT_FIX(1,0.1,0.00,0,YTD2),COLORGREEN;
JTD1:=STRCAT('',IF(J1,'季KD金叉',' '));
DRAWTEXT_FIX(1,0.05,0.00,0,JTD1),COLORRED;
JTD2:=STRCAT('',IF(J2,'季KD死叉',' '));
DRAWTEXT_FIX(1,0.05,0.00,0,JTD2),COLORGREEN;
ZTD1:=STRCAT('',IF(Z1,'周KD金叉',' '));
DRAWTEXT_FIX(1,0.15,0.00,0,ZTD1),COLORRED;
ZTD2:=STRCAT('',IF(Z2,'周KD死叉',' '));
DRAWTEXT_FIX(1,0.15,0.00,0,ZTD2),COLORGREEN;
RTD1:=STRCAT('',IF(R1,'日KD金叉',' '));
DRAWTEXT_FIX(1,0.2,0.00,0,RTD1),COLORRED;
RTD2:=STRCAT('',IF(R2,'日KD死叉',' '));
DRAWTEXT_FIX(1,0.2,0.00,0,RTD2),COLORGREEN;
RTD3:=STRCAT('',IF(R3,'日K值在20下面运行',' '));
DRAWTEXT_FIX(1,0.25,0.00,0,RTD3),COLORRED;
RTD4:=STRCAT('',IF(R4,'日K值在20至50之间运行',' '));
DRAWTEXT_FIX(1,0.25,0.00,0,RTD4),COLORRED;
RTD5:=STRCAT('',IF(R5,'日K值在50至80之间运行',' '));
DRAWTEXT_FIX(1,0.25,0.00,0,RTD5),COLORRED;
RTD6:=STRCAT('',IF(R6,'日K值在80上面运行',' '));
DRAWTEXT_FIX(1,0.25,0.00,0,RTD6),COLORRED;
IF(J<0,J,DRAWNULL),COLORGREEN,LINETHICK2;
IF(K>90,K,DRAWNULL),COLOR0000FF,LINETHICK2;
IF(D>85,D,DRAWNULL),COLORFFFF11,LINETHICK2;
DRAWICON(CROSS(J,1),J,1);
DRAWICON(K>80 AND D>80 AND CROSS(D,K),D,2);
DRAWTEXT(K>80,90,'★'),COLORRED;
DRAWTEXT(K<20,-5,'★'),COLORYELLOW;
DRAWTEXT(CROSS(80,K),80,'逃'),COLORYELLOW;



未来函数检测结果如下:
该公式包含未来函数:#MONTH
该公式包含未来函数:#WEEK
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式

联系我们  |  指标公式网  |  指标网   |  指标公式  |   加入收藏   |  设为主页

@2005-2023 浙ICP备2024071487号-2 指标公式网别名指标网仅为互联网文章,所有指标公式及文章仅供学习研究,并不构成投资建议,请勿以此为依据进行股票交易,由此引起的投资亏损与本站无关。指标公式网均来源互联网收集整理,如不慎侵犯了你的权益,请联系我们告知,我们将做删除处理
QQ:88652583 微信 88652583
sitemap站点地图