您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

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;
 
 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容