//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;
從中可以看出,三周期金叉指的是月線,周線以及日線中出現的金叉走勢形態(tài),都是股價買入的信號,當同時出現這三個金叉信號的時候,是非常準確的買入點位置,其對應的股價走勢形態(tài)如下:
但是在股市的交易中,不僅僅是這樣的一種指標,可以結合多種指標進行研究。
//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指標四種指標的頂背離和底背離的走勢形態(tài),具體的形態(tài)走勢如下。
以上就是本文為廣大投資者介紹的關于技術指標源碼中的結合應用以及KDJ指標三周期金叉的走勢形態(tài),如果您還想要了解更多的股票公式,請關注贏家財富網。
服務中心:鄭州市金水區(qū)農業(yè)路經三路
郵編:450002 網址:riverjudephoenix.com
銷售熱線:0371-65350319
技術支持:13333833889