飞狐KDJ三周期副图

input:nr(9,1,500,1),mr1(3,1,100,1),mr2(3,1,100,1),{ 日kdj参数 }
nw(9,1,500,1),mw1(3,1,100,1),mw2(3,1,100,1),{ 周kdj参数 }
nm(9,1,500,1),mm1(3,1,100,1),mm2(3,1,100,1);{ 月kdj参数 }
REFLINE: 0,20, 50, 80,100,150,180,200,250,300;
{ 日KDJ金叉 }
RSVR:=(CLOSE-LLV(LOW,NR))/(HHV(HIGH,NR)-LLV(LOW,NR))*100;
KR0:=SMA(RSVR,MR1,1);
kr:kr0+200,ColorFF0000;
DR0:=SMA(KR0,MR2,1);
dr:dr0+200,ColorFF0000,linethick2;
JR:3*KR-2*DR,color00ff00;


日金叉:=FILTER(cross(Kr0,Dr0),5){,colorffffff,linethick0};
stickline(日金叉,kr,kr*1.10,1,0),colorffffff,linethick2;
drawtext(日金叉,kr*1.10,'日金叉'),colorffffff,linethick1;

{ 周KDJ金叉 }
ZCw:=IF(BARPOS=1,1,DAYS1970-ref(DAYS1970,1)<>WEEKDAY-REF(WEEKDAY,1));
{上市第一日ZC取1,每周初交易日取1,其他交易日取0 }
STICKLINE(zcw ,100 ,110 ,0.8 ,1 ),colorff00ff;

Xw:=SUMBARS(ZCw,Nw);
Mw:=BARSLAST(ZCw)+1; { 最后一周交易日 }
RSVw:=(CLOSE-LLV(LOW,Xw))/(HHV(HIGH,Xw)-LLV(LOW,Xw))*100;
Kw0:=((RSVw+(Mw1-1)*REF("KDJ.K#WEEK",Mw))/Mw1);
kw:kw0+100,colorff00ff;
Dw0:=(Kw0+(Mw2-1)*REF("KDJ.D#WEEK",Mw))/Mw2;
dw:dw0+100,colorff00ff,linethick2;
Jw:3*Kw-2*Dw,Color00FFFF;
周金叉:=FILTER(cross(KW0,DW0),5){,colorffffff,linethick0};
stickline(周金叉,kw,kw*1.20,1,0),colorff00ff,linethick2;
drawtext(周金叉,kw*1.20,'周金叉'),colorff00ff,linethick1;
{ 月KDJ金叉 }
ZCM:=IF(BARPOS=1,1,BARPOS-ref(BARPOS,1)=1 and month<>ref(month,1));
{上市第一日ZC取1,每月初交易日取1,其他交易日取0 }
STICKLINE(zcm ,0 ,10 ,0.8 ,1 ),coloraaaaff;

XM:=SUMBARS(ZCM,NM);
MM:=BARSLAST(ZCM)+1; { 最后一月交易日 }
RSVM:=(CLOSE-LLV(LOW,XM))/(HHV(HIGH,XM)-LLV(LOW,XM))*100;
Km:(RSVM+(MM1-1)*REF("KDJ.K#month",MM))/MM1,coloraaaaff;
Dm:(Km+(MM2-1)*REF("KDJ.D#month",MM))/MM2,coloraaaaff,linethick2;
Jm:3*Km-2*Dm,;
月金叉:=FILTER(cross(Km,Dm),5){,coloraaaaff,linethick0};
stickline(月金叉,km,km*1.8,1,0),coloraaaaff,linethick2;
drawtext(月金叉,km*1.8,'月金叉'),coloraaaaff,linethick1;
PARTLINE(jm>80,jm),colorred;

{ KDJ共振 }
三金叉:FILTER(SUM(日金叉,5)>=1 AND SUM(周金叉,5)>=1 AND
SUM(月金叉,10)>=1,5),color0000ff,linethick0;
STICKLINE(三金叉 ,0 ,200 ,1 ,0 ),color0000ff,linethick3;
drawtext(三金叉,200,'月周日三金叉'),color0000ff,linethick2;
0,coloraaaaaa;100,coloraaaaaa;200,coloraaaaaa;
{公式名称:KD月周日
公式描述:逐日显示日,周,月三周期kdj};




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

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

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