CCI+KDJ复合信号选股指标,通达信公式:
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCI修正1:=EMA(EMA(EMA(CCI,2),2),2);
CCI修正2:=EMA(EMA(EMA(CCI,3),2),2);
X:=(CROSS(CCI修正1,CCI修正2)OR(CCI修正1>=CCI修正2))ANDCCI修正1>=-101ANDCCI修正1>=REF(CCI修正1,1)ANDREF(CCI修正1,1)<-101;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
K1:=EMA(EMA(EMA(K,2),2),2);
D1:=EMA(EMA(EMA(D,2),2),2);
J1:=EMA(EMA(EMA(J,2),2),2);
Y:=J1>REF(J1,1);
BUYHAOGU:XANDY;
同花顺CCI与KDJ共振指标公式源码
N:=9;
M1:=3;
M2:=3;
RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
a=SMA(RSV,M1,1);
b=SMA(a,M2,1);
e=3*a-2*b;
IF(a<0)a=0;
IF(a>100)a=100;
IF(b<0)b=0;
IF(b>100)b=100;
IF(e<0)e=0;
IF(e>100)e=100;
K:a;
D:b;
J:e;
N:=14;
TYP:=(IF(ISNULL(HIGH),CLOSE,HIGH)+IF(ISNULL(LOW),CLOSE,LOW)+CLOSE)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
a:100;
b:-100;