通达信动力KDJ改良副图指标
源码
布林极限:=100*(C-MA(C,20))/STD(C,20);
布林K值:=EMA(布林极限,10);
VAR2:=EMA(布林极限,5);
VAR3:=EMA(布林K值,5);
STICKLINE(VAR2>=VAR3,101,103,3,0),COLOR00FFFF;
STICKLINE(布林极限>=0,99,101,3,0),COLOR0000FF;
VAR1K:=(L+H+2*C)/4;
VAR2K:=REF(VAR1K,1);
VAR3K:=SMA(VAR1K-VAR2K,6,1)/SMA(ABS(VAR1K-VAR2K),2,1)*100;
MMS:=VAR3K+50;
MMM:=EMA(MMS,8);
STICKLINE(MMS>=100,105,107,6,0),COLORFFFFFF;
STICKLINE(MMS<0,-12,-14,2,0),COLORFFFFFF;
MAV:=(C*2+H+L)/4;
SK:=EMA(MAV,1)-EMA(MAV,40);
SD:=EMA(SK,5);
B:=(SK-SD)*50;
A:=(HHV(H,5)-C)/(HHV(H,5)-LLV(L,5))*10;
A1:=(3*A-2*SMA(A,3,1));
短线阻力:=IF(A1>50,50,IF(A1<-5,-5,A1));
短线能量:=IF(B<-20,-20,IF(B>50,50,B));
STICKLINE(短线能量>=短线阻力,0,短线能量+10,2,0),COLOR0000FF;
STICKLINE(短线能量>=短线阻力 AND 短线能量-REF(短线能量,1)<0,0,短线能量/2+10,2,0),COLOR00FF00;
STICKLINE(短线能量<短线阻力,0,短线能量+10,2,0),COLORFF0000;
BIAS1W:=(C-MA(C,6))/MA(C,6)*100;{BIAS}
BIAS2W:=(C-MA(C,12))/MA(C,12)*100;
BIAS3W:=(C-MA(C,24))/MA(C,24)*100;
MM:=(BIAS1W+2*BIAS2W+3*BIAS3W)/6;
MN:=MA(MM,3);
STICKLINE(MN<-12,-10,-12,2,0),COLOR00FF00;
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K:=SMA(RSV,3,1),COLORFF0000;
D:SMA(K,3,1),COLORFF0000;
J:3*K-2*D,COLOR00FF00;
DRAWICON(CROSS(J,D) AND D<=20,18,12);
IF(J<K,J,DRAWNULL),COLORFFFF00;
动力KDJ:IF(J>K,J,DRAWNULL),COLOR00FFFF;
IF(J>K AND J<REF(J,1),J,DRAWNULL),COLOR00FF00;
IF(J>K,D,DRAWNULL),COLOR00FF00;