飞狐KDJ+CCI组合指标,副图,飞狐+通达信源码,贴图,说明
文件里包含飞狐和通达信源码,前面为飞狐源码,下面是通达信源码。参数N为可调整,KDJ是变异的,CCI也是变异的,持股线是KDJ的J,变为红色表示J大于D;CCI大于50显示为加粗白线,表示进入强势区。最近本人已发了不少指标了,本来不想再发了,但是感到这个指标还可以,所以就作为暂时告别指标区的一点意思吧。
飞狐源码
n:=4;
均价:=(2*C+(C+H+L+O)/4+O)/4;
R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;
TYP:=(R+R1)/2;
CCI:((R+R1)/2-MA((R+R1)/2,n*9))/(0.015*AVEDEV((R+R1)/2,n*9))/4+50,COLORAAAA00;
PARTLINE(CCI<0,CCI),COLORGRAY;
PARTLINE(CCI>50,CCI),COLORWHITE,LINETHICK2;
RSV:=((R+R1)/2-LLV(R,n*9))/(HHV(R1,n*9)-LLV(R,n*9))*100;
K:=SMA(RSV,2+N,1);
D:=SMA(K,3,1);
J:=(3*K+2*D)/5,COLORRED,LINETHICK2;
持股线:J,COLORRED,LINETHICK2;
PARTLINE(J<D,J),COLORGRAY,LINETHICK2;
回踩线:=D,COLORGREEN;
0,COLORGREEN;20,COLORYELLOW,LINEDOT;50,COLORWHITE;80,COLORRED,LINEDOT;100,COLORBLUE;
下方为通达信源码
n:=4;
均价:=(2*C+(C+H+L+O)/4+O)/4;
R:=(2*L+3*均价)/5;R1:=(2*H+3*均价)/5;
TYP:=(R+R1)/2;
CCI:((R+R1)/2-MA((R+R1)/2,n*9))/(0.015*AVEDEV((R+R1)/2,n*9))/4+50,COLORAAAA00;
IF(CCI<0,CCI,DRAWNULL),COLORGRAY;
IF(CCI>50,CCI,DRAWNULL),COLORWHITE,LINETHICK2;
RSV:=((R+R1)/2-LLV(R,n*9))/(HHV(R1,n*9)-LLV(R,n*9))*100;
K:=SMA(RSV,2+N,1);
D:=SMA(K,3,1);
J:=(3*K+2*D)/5,COLORRED,LINETHICK2;
持股线:J,COLORRED,LINETHICK2;
IF(J<D,J,DRAWNULL),COLORGRAY,LINETHICK2;
回踩线:=D,COLORGREEN;
0,COLORGREEN;20,COLORYELLOW;50,COLORWHITE;80,COLORRED;100,COLORBLUE;