{KDJ信号}
{左侧交易指标,短线}
STICKLINE(C,50,20,10,0),COLOR996600;
STICKLINE(C,80,50,10,0),COLOR996600;
STICKLINE(C,100,100,10,0),COLOR996600;
STICKLINE(C,0,0,10,0),COLOR996600;
STICKLINE(C,50,50,10,0),COLOR000000;
{KM组合}{根据股价调整N,默认1000}
系数:=N/1000;
B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100- 70;
B2:=SMA(B1,9,1)+100;
B3:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;
B4:=SMA(B3,3,1);
B5:=SMA(B4,3,1)+100;
B6:=B5-B2;
B7:=IF(B6>60,B6-60,0);
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),COLORBLUE,LINETHICK2,NODRAW;
DEA1:=EMA(DIFF,9);
MACD:2*(DIFF-DEA1)*60,LINETHICK0,NODRAW;
S1:=MACD0,COLORBLUE;
S2:=MACDSTICKLINE(MACD>=0,MACD*系数,0,8,1),COLORRED;
STICKLINE(S1,0,MACD*系数,8,1),COLOR00FFFF;
STICKLINE(MACD<0,MACD*系数,0,8,1),COLOR996600;
STICKLINE(S2,0,MACD*系数,8,1),COLOR00AA00;
{长KDJ}
长RSV:=(((CLOSE - LLV(LOW,90)) / (HHV(HIGH,90) - LLV(LOW,90))) * 100);
长K:=SMA(长RSV,12,1),COLORWHITE,POINTDOT,LINETHICK4;
长D:SMA(长K,12,1),COLORYELLOW,POINTDOT,LINETHICK4,NODRAW;
长J:((3 * 长K) - (2 *长D)),COLORRED,POINTDOT,LINETHICK4;
STICKLINE(CROSS(长D,80),108,115,4,0),COLOR33FF33;
STICKLINE(CROSS(长D,15),0,10,4,0),COLOR3333AA;
{KDJ}
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));
DRAWICON(FILTER(CROSS(K,D)AND K<50,1),0,1);
STICKLINE(CROSS(90,J),108,115,4,0),COLORGREEN;
DRAWTEXT(CROSS(90,J),105,'抛'),COLORGREEN;
STICKLINE(CROSS(J,(0 - 5)),0,10,4,0),COLORCYAN;
DRAWTEXT(CROSS(J,(0 - 5)),(0 - 4),'吸'),COLORCYAN;
{KDJ背离}
AA2:=BARSLAST(REF(CROSS(K,D),1));
BB2:=REF(C,AA2+1)>C AND REF(K,AA2+1)
DRAWTEXT(FILTER(BB2>0,5),-8,'底背离'),COLORYELLOW;
CC2:=BARSLAST(REF(CROSS(D,K),1));
DD2:=REF(C,CC2+1)
DRAWTEXT(FILTER(DD2>0,5),-8,'顶背离'),COLORGREEN;
{显示优化}
STICKLINE(REF(B7,1)
短D:D,COLORYELLOW,LINETHICK2;
短J:J,COLORMAGENTA,LINETHICK2;
金叉D:IF((K > D),D,DRAWNULL),COLORYELLOW,LINETHICK4;
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!