同花顺KD强弱副图指标 KDJ另一种形式表达 源码

{"求KDJ值";}
N:=9;
VAR4:=LLV(LOW,N);
VAR5:=HHV(HIGH,N);
rsv:=(CLOSE-VAR4)/(VAR5-VAR4)*100;
K:SMA(rsv,3,1),coloryellow,nodraw;
D:SMA(K,3,1),colorliblue,NODRAW;
PARTLINE(D,D>REF(D,1),coloryellow,D<=REF(D,1),colorliblue),LINETHICK1;
J:=3*K-2*D;
IF(J<0) J=0;
IF(J>100) J=100;
J9:J,colormagenta;
{"增加5日的J线";}
RSV5=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;
KA5:=SMA(RSV5,3,1);
DA5:=SMA(KA5,3,1);
JA5:=3*KA5-2*DA5;
IF(JA5<0) JA5=0;
IF(JA5>100) JA5=100;
J5:JA5,colorgray;
{"K值柱状线";}
STICKLINE(K>REF(K,1),K ,REF(K,1),6,0),colorred;
STICKLINE(K<=REF(K,1),K ,REF(K,1),6,0),colorgreen;
STICKLINE(CROSS(k,d),k,REF(k,1),6,0),coloryellow;
STICKLINE(CROSS(D,K),k,REF(k,1),6,0),colorblue;
{"强弱分区";}
//顶:105,colorgray,DRAWNULL;
强势区:80,colorgray;
强弱分界:50,coloryellow;
弱势区:20,colorgray;
//底:0,DRAWNULL;
K值企稳:IF((K>REF(K,1)) AND (REF(K,1)<=REF(K,2)) AND (REF(K,2)<=REF(K,3)),5,0),coloryellow;//COLOR99CC99;
K值低位:IF((K>REF(K,1)) AND (REF(K,1)<=REF(K,2)) AND REF(K,1)<20,-5,0),colorred,LINETHICK1;
高位下跌:IF((D<REF(D,1)) AND (REF(D,1)>=REF(D,2)) AND REF(K,1)>80,95,100),colorgreen,Linethick1;
{"均线系统一,操盘线BBI";}
VAR1:=(2*C+H+L+O)/5;
VAR2:=(MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20)+MA(CLOSE,30))/4;
操盘线:IF(VAR2,0,DRAWNULL),colorgray,LINETHICK3;
红买1:IF(VAR1>VAR2,0,DRAWNULL), colorred,LINETHICK3;
蓝卖:IF(VAR1<VAR2,0,DRAWNULL),colorFFFF00,LINETHICK3;
{"均线系统二,30日均线";}
VAR6:=(2*C+H+L+O)/5;
MA30:=MA(C,30);
生命线:IF(MA30,100,DRAWNULL),colorgray,LINETHICK3;
红买2:IF(VAR6>MA30,100,DRAWNULL), colorred,LINETHICK3;
绿卖:IF(VAR6<MA30,100,DRAWNULL),colorgreen,LINETHICK3;
{"ZIG未来函数";}
VARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND
(REF(ZIG (3,5),2)<=REF(ZIG(3,5),3));
VARD:=(ZIG(3,5)<REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND
(REF(ZIG(3,5),2)>=REF(ZIG(3,5),3));
//STICKLINE((VARC=1),100,105,10,1),colorred;
//STICKLINE((VARD=1),100,105,10,1),colorgreen;
DRAWTEXT(VARC,106,"B"),colorred;
DRAWTEXT(VARD,106,"S"),colorgreen;
//DRAWICON(VARc,109,7);
//DRAWICON(VARd,109,8);
{"资金标枪bias线平均";}{"6日乖离5日平均再平均使其圆滑";}
//VARX:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;{"6日的BIAS";}
//指标BIAS:EMA(EMA(VARX,5),5)*4, COLORSTICK;{"原放大参数是3";}


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

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

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