本人《巧用KDJ》——(有图有代码)
描述:KDJ指标的本质是股价在某时期内最高价和最低价中所处的位置。
默认参数9,就是说股价在9天中最高价和最低价所处位置。如果j达到100了,你以为是到顶了;
如果我把9改成90或180或240,那它就是刚刚涨的开始;
参数设置:
{n 0 500 180}
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:3*K-2*D;
P:IF(J<D,HHV(J,5),REF(HHV(J,5),3));
W:MA(P,5);
STICKLINE(J>REF(J,1),J,W,0,0),COLORLIMAGENTA;
STICKLINE(J<=REF(J,1),J,W,0,0),COLORLIGREEN;
JJ:IF(J>REF(J,1) AND C>O,J+DYNAINFO(17)+DYNAINFO(14),J),COLORWHITE;
DRAWBAND(JJ,RGB(255,255,0),J,20);
DRAWICON(CROSS(JJ,W),J,26);
DRAWICON(CROSS(JJ,CONST(REF(HHV(J,3),2))),J,26);
DRAWICON(CROSS(JJ,10) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,20) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,30) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,40) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,50) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,60) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,70) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,80) AND DYNAINFO(17)>2,J,26);
DRAWICON(CROSS(JJ,90) AND DYNAINFO(17)>2,J,26);
图效:
1524111093.jpg
1524200921.jpg
|