變色與變形KDJ指標在股市怎樣應用(附源碼)(3)
2016-11-28 10:56 贏家江恩
3、kdj優(yōu)化
月K金:IF(CROSS(“KDJ.K#MONTH”,“KDJ.D#MONTH”),90,0),COLORYELLOW,LINETHICK1;
IF((“KDJ.K#MONTH”》“KDJ.D#MONTH”),60,0),COLORYELLOW,CIRCLEDOT;
STICKLINE(CROSS(“KDJ.K#MONTH”,“KDJ.D#MONTH”),100,0,3,0),COLORYELLOW;
月K死:IF(CROSS(“KDJ.D#MONTH”,“KDJ.K#MONTH”),90,0),COLORGREEN,LINETHICK1;
IF((“KDJ.K#MONTH”《“KDJ.D#MONTH”),60,0),COLORGREEN,CIRCLEDOT;
STICKLINE(CROSS(“KDJ.D#MONTH”,“KDJ.K#MONTH”),100,0,3,0),COLORGREEN;
周K金:IF(CROSS(“KDJ.K#WEEK”,“KDJ.D#WEEK”),70,0),COLORRED;
IF((“KDJ.K#WEEK”》“KDJ.D#WEEK”),30,0),COLORRED,CROSSDOT;
STICKLINE(CROSS(“KDJ.K#WEEK”,“KDJ.D#WEEK”),100,0,1,0),COLORRED;
周K死:IF(CROSS(“KDJ.D#WEEK”,“KDJ.K#WEEK”),70,0),COLORBLUE,LINETHICK1;
IF((“KDJ.K#WEEK”《“KDJ.D#WEEK”),30,0),COLORBLUE,CROSSDOT;
STICKLINE(CROSS(“KDJ.D#WEEK”,“KDJ.K#WEEK”),100,0,1,0),COLORBLUE;
RSV60:=(CLOSE-LLV(LOW,9/2))/(HHV(HIGH,9/2)-LLV(LOW,9/2))*100;
K60:=SMA(RSV60,3,1);
D60:=SMA(K60,3,1);
J60:=3*K60-2*D60;
STICKLINE(K60》=D60,5,0,3,0),COLORRED;
STICKLINE(K60
RSV30:=(CLOSE-LLV(LOW,9/4))/(HHV(HIGH,9/4)-LLV(LOW,9/4))*100;
K30:=SMA(RSV30,3,1);
D30:=SMA(K30,3,1);
J30:=3*K30-2*D30;
STICKLINE(K30》=D30,90,87,3,0),COLORRED;
STICKLINE(K30
N:=9; M1:=3; M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1),COLORFFFFFF,LINETHICK1;
D:SMA(K,M2,1),COLOR0080FF,LINETHICK1;
J:3*K-2*D,COLORFF00FF,LINETHICK1;
IF(J》100,J,DRAWNULL),COLORFFFF00,LINETHICK2;
IF(J《0,J,DRAWNULL),COLORGREEN,LINETHICK2;
DRAWICON(CROSS(J,D),D,1);
DRAWICON(CROSS(D,J),D,2);
0,COLOR008000,DOTLINE;
100,COLOR808040,DOTLINE;
很多的技術(shù)指標在使用過程中,需要不同的優(yōu)化,kdj指標也不例外,投資者需要經(jīng)過指標源碼的優(yōu)化來分析更加準確的走勢形態(tài),從而獲得其中的操作盈利,如圖上證指數(shù)在2010年的指數(shù)價格走勢變化,依據(jù)價格的變化,kdj指標優(yōu)化之后,在指標線中,形成了短線買入點位置以及短線賣出的形態(tài),同時也可以做長線買賣操作。