此《KDJ加K线》与《MACD加K线》主图指标和日前奉献的《BIAS叠加K线》,《反弹K线》等指标可以共同组成一个系列主图指标,为众多学友们根据自己的不同爱好选择正确地操盘方法提供更多较好的依据。
MACD加K线指标源码:
EMA9:EMA(C,9),COLORFF00FF,LINETHICK1;
EMA13:EMA(C,13),COLOR00FFFF,LINETHICK1;
EMA34:EMA(C,34),COLORC0FF7F,LINETHICK1;
EMA55:EMA(C,55),COLORFFFFFF,LINETHICK1;
DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
AA:=DIF>=DEA ;
BB:=DEA>DIF ;
DRAWICON(CROSS(DIF,DEA),L-0.2,23);
DRAWICON(CROSS(DEA,DIF),H+0.2,15);
STICKLINE(AA,C,O,3,0),COLORRED;
STICKLINE(AA,H,L,0.5,0),COLORRED;
STICKLINE(BB,C,O,3,0),COLOR00FF00;
STICKLINE(BB,H,L,0.5,0),COLOR00FF00;
{红}
STICKLINE(AA,CLOSE,OPEN,3,0),COLOR005599;
STICKLINE(AA,CLOSE,OPEN,2.2,0),COLOR0000DD;
STICKLINE(AA,CLOSE,OPEN,1.5,0),COLOR0055FF;
STICKLINE(AA,CLOSE,OPEN,0.5,0),COLORCC66EE;
{蓝}
STICKLINE(BB,CLOSE,OPEN,3,0),COLORFF7799;
STICKLINE(BB,CLOSE,OPEN,2.2,0),COLORFF9999;
STICKLINE(BB,CLOSE,OPEN,1.5,0),COLORFFBB99;
STICKLINE(BB,CLOSE,OPEN,0.5,0),COLORCYAN;
附图:
KDJ加K线指标源码:
EMA9:EMA(C,9),COLORFF00FF,LINETHICK1;
EMA13:EMA(C,13),COLOR00FFFF,LINETHICK1;
EMA34:EMA(C,34),COLORC0FF7F,LINETHICK1;
EMA55:EMA(C,55),COLORFFFFFF,LINETHICK1;
N1:=9;N:=3;
VAR1:=REF(CLOSE,1);
VAR2:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
VAR3:=SMA(VAR2,3,1);
VAR4:=SMA(VAR3,3,1);
VAR5:=SMA(VAR4,3,1);
K:= VAR3,COLORMAGENTA;
D:= VAR4, COLORRED;
J:= VAR5 ,COLORYELLOW;
AA:=K>=D ;
BB:=D>K ;
DRAWICON(CROSS(K,D),L-0.2,23);
DRAWICON(CROSS(D,K),H+0.2,15);
STICKLINE(AA,C,O,3,0),COLORRED;
STICKLINE(AA,H,L,0.5,0),COLORRED;
STICKLINE(BB,C,O,3,0),COLOR00FF00;
STICKLINE(BB,H,L,0.5,0),COLOR00FF00;
{红}
STICKLINE(AA,CLOSE,OPEN,3,0),COLOR005599;
STICKLINE(AA,CLOSE,OPEN,2.2,0),COLOR0000DD;
STICKLINE(AA,CLOSE,OPEN,1.5,0),COLOR0055FF;
STICKLINE(AA,CLOSE,OPEN,0.5,0),COLORCC66EE;
{蓝}
STICKLINE(BB,CLOSE,OPEN,3,0),COLORFF7799;
STICKLINE(BB,CLOSE,OPEN,2.2,0),COLORFF9999;
STICKLINE(BB,CLOSE,OPEN,1.5,0),COLORFFBB99;
STICKLINE(BB,CLOSE,OPEN,0.5,0),COLORCYAN;
附图:
|