//KDJ三周期金叉指标公式
月K:"KDJ.K"(89,3,3),COLOR00FF00;
月D:"KDJ.D"(89,3,3),COLOR00FF00,LINETHICK2;
周K:"KDJ.K"(27,3,3),colorred;
周D:"KDJ.D"(27,3,3),colorred,LINETHICK2;
DRAWBAND(周D,RGB(0,255,0),周K,RGB(255,0,255));
DRAWBAND(月D,RGB(0,0,205),月K,RGB(139,69,19));
日K:"KD.K"(5,3,3),colorwhite;
日D:"KD.D"(5,3,3),colorwhite,LINETHICK2;
日金叉:=IF(CROSS(日K,日D),50,0),COLORFFFFFF;
DRAWTEXT(日金叉,50,'日叉'),COLORFFFFFF;
周金叉:=IF(CROSS(周K,周D),30,0),colorred;
DRAWTEXT(周金叉,30,'周叉'),colorred;
月金叉:=IF(CROSS(月K,月D),20,0),COLOR0080FF;
DRAWTEXT(月金叉,20,'月叉'),coloryellow;
从中可以看出,三周期金叉指的是月线,周线以及日线中出现的金叉走势形态,都是股价买入的信号,当同时出现这三个金叉信号的时候,是非常准确的买入点位置,其对应的股价走势形态如下:
但是在股市的交易中,不仅仅是这样的一种指标,可以结合多种指标进行研究。
//MACD+KDJ+RSI+DMI顶底背离指标公式
底:-50;
顶:50;
TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD := HIGH-REF(HIGH,1);
LD := REF(LOW,1)-LOW;
PDM:= SUM(IF(HD>0 AND HD>LD,HD,0),14);
MDM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:= PDM*100/TR;
MDI:= MDM*100/TR;
A1:=BARSLAST(ref(cross("macd.diff"(12,26,9),"macd.dea"(12,26,9)),1));
B1:=ref(c,A1+1)>c and ref("macd.diff"(12,26,9),A1+1)<"macd.diff"(12,26,9) and cross("macd.diff"(12,26,9),"macd.dea"(12,26,9));
A2:=BARSLAST(ref(cross("kdj.k"(9,3,3),"kdj.d"(9,3,3)),1));
B2:=ref(c,A2+1)>c and ref("kdj.k"(9,3,3),A2+1)<"kdj.k"(9,3,3) and cross("kdj.k"(9,3,3),"kdj.d"(9,3,3));
A3:=BARSLAST(ref(cross("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=ref(c,A3+1)>c and ref("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) and cross("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(ref(cross("macd.dea"(12,26,9),"macd.diff"(12,26,9)),1));
D1:=ref(c,C1+1)
C2:=BARSLAST(ref(cross("kdj.d"(9,3,3),"kdj.k"(9,3,3)),1));
D2:=ref(c,C2+1)
C3:=BARSLAST(ref(cross("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=ref(c,C3+1)
C4:=BARSLAST(ref(cross(mdi,pdi),1));
D4:=ref(c,C+1)
A4:=BARSLAST(ref(cross(PDI,MDI),1));
B4:=ref(c,A4+1)>c and ref(pdi,A4+1)
DMI底背:IF(B4>0,-50,0),COLOR0099FF,POINTDOT;
DRAWTEXT(DMI底背,-5,'DMI底背'),color0099FF;
DMI顶背:IF(D4>0,50,0),COLORBLUE,POINTDOT;
DRAWTEXT(DMI顶背,15,'DMI顶背'),COLORBLUE;
MACD底背:if(B1>0,-50,0),colorred,pointdot;
DRAWTEXT(MACD底背,-15,'MACD底背'),COLORred;
KDJ底背:if(B2>0,-50,0),colorff00ff,pointdot;
DRAWTEXT(KDJ底背,-25,'KDJ底背'),COLORff00ff;
RSI底背:if(B3>0,-50,0),coloryellow,pointdot;
DRAWTEXT(RSI底背,-35,'RSI底背'),COLORyellow;
MACD顶背:if(D1>0,50,0),color00ff00,pointdot;
DRAWTEXT(MACD顶背,25,'MACD顶背'),COLOR00ff00;
KDJ顶背:if(D2>0,50,0),colorffcc66,pointdot;
DRAWTEXT(KDJ顶背,35,'KDJ顶背'),COLORffcc66;
RSI顶背:if(D3>0,50,0),colorffffff,pointdot;
DRAWTEXT(RSI顶背,45,'RSI顶背'),COLORffffff;
STICKLINE(B1>0,-50,0,2,0),colorred;
STICKLINE(B2>0,-50,0,2,0),colorff00ff;
STICKLINE(B3>0,-50,0,2,0),coloryellow;
STICKLINE(d1>0,50,0,2,0),color00ff00;
STICKLINE(d2>0,50,0,2,0),colorffcc66;
STICKLINE(d3>0,50,0,2,0),colorwhite;
STICKLINE(B4>0,-50,0,2,0),color0099ff;
STICKLINE(D4>0,50,0,2,0),colorblue;
其中分别介绍了macd指标、kdj指标、rsi指标、dmi指标四种指标的顶背离和底背离的走势形态,具体的形态走势如下。
以上就是本文为广大投资者介绍的关于技术指标源码中的结合应用以及KDJ指标三周期金叉的走势形态,如果您还想要了解更多的股票公式,请关注老K股票学习网。
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!