通达信MACD与KDJ结合分时指标公式

{使用说明:红箭头买入,绿箭头卖出!最好在MACD下方KDJ金叉买入,在MACD上方KDJ死叉卖出,其他地方的金叉和死叉,是需要各位自己判断一下!}

N1:=3;
N2:=30;
M1:=3;
M2:=3;
DIF:=(EMA(CLOSE,N1)-EMA(CLOSE,N2))/(EMA(CLOSE,N2))*100,COLORBLUE,LINETHICK1;
K:SMA(DIF,M1,1);
D:SMA(K,M2,1);
J:K+1.0*(K-D);
DD:=2*K-2*D;
DOWN:IF(1,DD,DRAWNULL),STICK,,COLORGREEN,LINETHICK2;
UP:IF(DD>REF(DD,1),DD,DRAWNULL),STICK,,COLORRED,LINETHICK2;
DRAWICON(CROSS(J,K) AND DOWN>=0 AND J<5,J,1);
DRAWICON(CROSS(D,K) AND DOWN<=0,D,2);

(0)

相关推荐