在线检测未来函数

飞狐KDJ通道指标公式

来源:Internet,编辑:股旁网,2011-01-23

input: N(19,1,100),m1(3,1,100),m2(3,1,100);
DRAWGBK(C,COLORRGB(0,150,130),COLORRGB(0,0,0),0);
PARTLINE(C,-20),POINTDOT,COLORGREEN;
PARTLINE(C,120),POINTDOT,COLORYELLOW;
u:=(HHV(H,n)-LLV(L,n))/100;
Rc:=(C-LLV(L,n))/u;
KK:SMA(Rc,m1,1),PRECISION2,COLORWHITE;
KD:SMA(KK,M2,1),PRECISION2,COLORYELLOW;
KJ:3*KK-2*KD,PRECISION2,COLORMAGENTA;
上轨: KD + 14*STD(KD,60)/10,COLORgreen,LINEDOT,PRECISION2;
下轨: KD - 14*STD(KD,60)/10,COLORgreen,LINEDOT,PRECISION2;
Rh:=(H-LLV(L,n))/u;
Ro:=(o-LLV(L,n))/u;
RL:=(L-LLV(L,n))/u;
Ko:=(ro+(m1-1)*ref(kk,1))/m1;
Kh:=(rh+(m1-1)*ref(kk,1))/m1;
KL:=(rL+(m1-1)*ref(kk,1))/m1;
STICKLINE(KK>ko or (KK=ko and KK>=ref(KK,1)),kh,kL,0.1,0),COLOR0000FF;
STICKLINE(KK>ko or (KK=ko and KK>=ref(KK,1)),KK,ko,5,0),COLOR0000FF;
STICKLINE(KK<ko or (KK=ko and KK<ref(KK,1)),kh,kL,0.1,0),COLORFF0000;
STICKLINE(KK<ko or (KK=ko and KK<ref(KK,1)),KK,ko,5,1),COLORFF0000;
{股旁网-股票公式网站 www.GupAng.com}
KKDJ:=(3*70-2*REF(kk,1))*(HHV(H,9)-LLV(L,9))/100+LLV(L,9);
KKDJ2:=((3*(100-70))-2*REF(kk,1)*(HHV(H,9)-LLV(L,9)))/100+LLV(L,9);
KDJ交叉位:=(3*REF(kd,1)-2*REF(kk,1))*(HHV(H,9)-LLV(L,9))/100+LLV(L,9);
DRAWTEXT(((SYSPARAM(1)=BARSCOUNT(C)) and (KDJ交叉位<C)),10,'KDJ死叉位 = '),SHIFT1,ALIGN2,COLORWHITE;
DRAWNUMBER((SYSPARAM(1)=BARSCOUNT(C) and (KDJ交叉位<C)),10,KDJ交叉位,2),SHIFT1,ALIGN2,COLORWHITE;//死叉
DRAWTEXT(((SYSPARAM(1) = BARSCOUNT(C)) and (KDJ交叉位>C)),10,'KDJ金叉位 = '),SHIFT1,ALIGN2,COLORWHITE;
DRAWNUMBER((SYSPARAM(1) = BARSCOUNT(C) and (KDJ交叉位>C)),10,KDJ交叉位,2),SHIFT1,ALIGN2,COLORWHITE;//金叉

飞狐KDJ通道指标公式

 

相关文章