以下是通达信KDJ共振指标公式
N:=3;M1:=9;M2:=9;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1) COLORWHITE;
D:=SMA(K,M2,1)COLORBLUE LINETHICK2;
J:=3*K-2*D COLORMAGENTA;
平衡:(HHV(HIGH,N)-LLV(LOW,N))*(3*D-2*K)/100+LLV(LOW,N) NODRAW;
月K:”KDJ.K#MONTH”(9,3,3),COLOR0080FF,DOTLINE;
月D:”KDJ.D#MONTH”(9,3,3),COLOR0080FF,LINETHICK3;
月J:=”KDJ.J#MONTH”(9,3,3);
周K:”KDJ.K#WEEK”(9,3,3),COLORRED,DOTLINE;
周D:”KDJ.D#WEEK”(9,3,3),COLORRED,LINETHICK3;
周J:=”KDJ.J#WEEK”(9,3,3);
日K:”KDJ.K#DAY”(9,3,3),COLORWHITE,DOTLINE;
日D:”KDJ.D#DAY”(9,3,3),COLORWHITE,LINETHICK3;
日J:=”KDJ.J#DAY”(9,3,3);
分K:”KDJ.K”(9,3,3),COLORGREEN,DOTLINE;
分D:”KDJ.D”(9,3,3),COLORGREEN,LINETHICK3;
分J:=”KDJ.J”(9,3,3);
分金叉:IF(CROSS(分K,分D) AND (分D<40 OR 分D>60),20,0),COLORGREEN;
日金叉:IF(CROSS(日K,日D) AND (日D<40 OR 日D>60),20,0),COLORWHITE;
周金叉:IF(CROSS(周K,周D) AND (周D<40 OR 周D>60),30,0),COLORRED;
月金叉:IF(CROSS(月K,月D) AND (月D<40 OR 月D>60),40,0),COLOR0080FF;
共振:(周金叉 AND 日金叉) OR (周金叉 AND 月金叉) OR (日金叉 AND 月金叉),COLORYELLOW,NODRAW;
STICKLINE(共振,0,50,1,0),COLORYELLOW;
STICKLINE(月J<0,0,月J,2,-1),COLOR0080FF;
STICKLINE(月J>100,100,月J,2,-1),COLOR0080FF;
STICKLINE(周J<0,0,周J,1,-1),COLORRED;
STICKLINE(周J>100,100,周J,1,-1),COLORRED;
STICKLINE(日J<0,0,日J,0,0),COLORWHITE;
STICKLINE(日J>100,100,日J,0,0),COLORWHITE;
评论(0)