同花顺KDJ趋势指标
自用的KDJ指标,分析方法根KDJ指标一样。
源码
RS=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
RSV=(C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100;
a1=SMA(RS,3,1);
b1=SMA(a1,3,1);
e1=3*a1-2*b1;
a=SMA(RSV,10,1);
b=SMA(a,3,1);
e=3*a-2*b;
K:a1,coloryellow ,linethick1;
D:b1,colorliblue ,linethick1;
J:e1,COLORff00ff ,linethick1;
趋势k:a;//隐藏;
趋势D:b;//隐藏;
趋势J:e;//隐藏;
STICKLINE(趋势J>趋势D,趋势J,趋势D,6,0),coloryellow;
STICKLINE(趋势J<趋势D,趋势J,趋势D,6,0),colorgreen;
STICKLINE(趋势D>趋势k,趋势D,趋势K,6,0),colorblue;
STICKLINE(趋势J>趋势K,趋势J,趋势k,6,0),colorred;
STICKLINE(V>85,85,85,3,0),colorgreen;
STICKLINE(V>50,50,50,5,0),colorgray;
STICKLINE(V>20,20,20,3,0),colorred;
DRAWICON(CROSS(K,D),25,1);
DRAWICON(CROSS(D,K),95,2);
VAR2:=(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100);
VAR3:=(((CLOSE - LLV(LOW,18)) / (HHV(HIGH,18) - LLV(LOW,18))) * 100);
VAR4:=SMA(VAR3,9,1);
VAR5:=SMA(VAR4,3,1);
红线在上持股:((3 * VAR4) - (2 * VAR5)), LINETHICK2 , colorred;
VAR6:=(红线在上持股 > (1 * REF(红线在上持股,1)));
VAR7:=LLVBARS(LOW,50);
VAR8:=SUM(VOL,VAR7);
VAR9:=HHVBARS(HIGH,50);
VAR10:=SUM(VOL,VAR9);
VAR11:=(((CLOSE - REF(OPEN,VAR9)) / REF(OPEN,VAR9)) * 100);
VAR12:=((VAR10 / CAPITAL) * 100);
VAR13:=(((CLOSE - REF(OPEN,VAR7)) / REF(OPEN,VAR7)) * 100);
VAR14:=((VAR8 / CAPITAL) * 100);
VAR15:=(MA(WINNER(CLOSE),3) * 100);
VAR16:=EMA(VAR4,3);
回档不破洗盘:EMA(VAR4,3),COLORFFFFFF,LINETHICK2;
红线下穿减仓:EMA(回档不破洗盘,3),COLORFFCC66;
无量阴跌空仓:EMA(红线下穿减仓,3),COLORCC9966;
仅供参考:EMA(无量阴跌空仓,3),COLORCC6666;
A6:EMA(仅供参考,3),COLORCC3366;
A7:EMA(A6,3),LINETHICK2,COLORCC3366;
VAR17:=EMA(A7,3);
VAR18:=EMA(VAR17,3);
VAR19:=EMA(VAR18,3);
AA:EMA(仅供参考,6),COLORFF0000;
DRAWICON(CROSS(红线在上持股,A7),(红线在上持股 - 0.01),23);
DRAWICON(CROSS(红线下穿减仓,红线在上持股),红线下穿减仓,19);
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
操盘:=3*VAR300-2*VAR400;
A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;
STICKLINE(A1,30,0,4,0),COLOR770077;
STICKLINE(A1,30,0,3,0),COLOR990099;
STICKLINE(A1,30,0,2,0),COLORBB00BB;
STICKLINE(A1,30,0,1,0),COLORDD00DD;
STICKLINE(A1,30,0,0.3,0),COLORFF00FF;
DRAWTEXT(A1,36,'买'),colorred;
DRAWTEXT(REF("KDJ.J",1)<0 AND "KDJ.J">0,20,'短'),colorred ;
STICKLINE(REF("KDJ.J",1)<0 AND "KDJ.J">0,20,0,3,0),colorred;
A8A:=(C+O+L+H)/4;
B8B:=REF(CLOSE,A8A);
处女线:=SMA(MAX(CLOSE-B8B,0),2,1)/SMA(ABS(CLOSE-B8B),2,1)*100;
DZ1:=处女线>REF(处女线,1) AND 处女线>89;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCI修正1:=EMA(EMA(EMA(CCI,2),2),2);
CCI修正2:=EMA(EMA(EMA(CCI,3),2),2);
DZ2:=CCI修正1>100;
T:=CLOSE*1.0+LOW*0.0+HIGH*0.0;
SL:=(T/REF(T,1)-1)*1000;
快:=XMA(XMA(XMA(SL,3),3),3);
慢:=XMA(XMA(XMA(SL,5),5),5);
X:=快-慢;
增速1:=X;
WWW:=REF(增速1,1)<0;
DZ4:=增速1>3 AND WWW;
DZ:=DZ1 AND DZ2 AND DZ4;
STICKLINE(DZ,0,10,4,0),COLOR00FFFF;
DRAWTEXT(DZ,10,'天牛'),COLOR00FFFF;
移动端首页 | PC端
© by Gszb.com Mobile Web
同花顺KDJ趋势指标
自用的KDJ指标,分析方法根KDJ指标一样。
源码
RS=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
RSV=(C-LLV(L,20))/(HHV(H,20)-LLV(L,20))*100;
a1=SMA(RS,3,1);
b1=SMA(a1,3,1);
e1=3*a1-2*b1;
a=SMA(RSV,10,1);
b=SMA(a,3,1);
e=3*a-2*b;
K:a1,coloryellow ,linethick1;
D:b1,colorliblue ,linethick1;
J:e1,COLORff00ff ,linethick1;
趋势k:a;//隐藏;
趋势D:b;//隐藏;
趋势J:e;//隐藏;
STICKLINE(趋势J>趋势D,趋势J,趋势D,6,0),coloryellow;
STICKLINE(趋势J<趋势D,趋势J,趋势D,6,0),colorgreen;
STICKLINE(趋势D>趋势k,趋势D,趋势K,6,0),colorblue;
STICKLINE(趋势J>趋势K,趋势J,趋势k,6,0),colorred;
STICKLINE(V>85,85,85,3,0),colorgreen;
STICKLINE(V>50,50,50,5,0),colorgray;
STICKLINE(V>20,20,20,3,0),colorred;
DRAWICON(CROSS(K,D),25,1);
DRAWICON(CROSS(D,K),95,2);
VAR2:=(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100);
VAR3:=(((CLOSE - LLV(LOW,18)) / (HHV(HIGH,18) - LLV(LOW,18))) * 100);
VAR4:=SMA(VAR3,9,1);
VAR5:=SMA(VAR4,3,1);
红线在上持股:((3 * VAR4) - (2 * VAR5)), LINETHICK2 , colorred;
VAR6:=(红线在上持股 > (1 * REF(红线在上持股,1)));
VAR7:=LLVBARS(LOW,50);
VAR8:=SUM(VOL,VAR7);
VAR9:=HHVBARS(HIGH,50);
VAR10:=SUM(VOL,VAR9);
VAR11:=(((CLOSE - REF(OPEN,VAR9)) / REF(OPEN,VAR9)) * 100);
VAR12:=((VAR10 / CAPITAL) * 100);
VAR13:=(((CLOSE - REF(OPEN,VAR7)) / REF(OPEN,VAR7)) * 100);
VAR14:=((VAR8 / CAPITAL) * 100);
VAR15:=(MA(WINNER(CLOSE),3) * 100);
VAR16:=EMA(VAR4,3);
回档不破洗盘:EMA(VAR4,3),COLORFFFFFF,LINETHICK2;
红线下穿减仓:EMA(回档不破洗盘,3),COLORFFCC66;
无量阴跌空仓:EMA(红线下穿减仓,3),COLORCC9966;
仅供参考:EMA(无量阴跌空仓,3),COLORCC6666;
A6:EMA(仅供参考,3),COLORCC3366;
A7:EMA(A6,3),LINETHICK2,COLORCC3366;
VAR17:=EMA(A7,3);
VAR18:=EMA(VAR17,3);
VAR19:=EMA(VAR18,3);
AA:EMA(仅供参考,6),COLORFF0000;
DRAWICON(CROSS(红线在上持股,A7),(红线在上持股 - 0.01),23);
DRAWICON(CROSS(红线下穿减仓,红线在上持股),红线下穿减仓,19);
VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;
VAR400:=EMA(VAR300,5);
操盘:=3*VAR300-2*VAR400;
A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;
STICKLINE(A1,30,0,4,0),COLOR770077;
STICKLINE(A1,30,0,3,0),COLOR990099;
STICKLINE(A1,30,0,2,0),COLORBB00BB;
STICKLINE(A1,30,0,1,0),COLORDD00DD;
STICKLINE(A1,30,0,0.3,0),COLORFF00FF;
DRAWTEXT(A1,36,'买'),colorred;
DRAWTEXT(REF("KDJ.J",1)<0 AND "KDJ.J">0,20,'短'),colorred ;
STICKLINE(REF("KDJ.J",1)<0 AND "KDJ.J">0,20,0,3,0),colorred;
A8A:=(C+O+L+H)/4;
B8B:=REF(CLOSE,A8A);
处女线:=SMA(MAX(CLOSE-B8B,0),2,1)/SMA(ABS(CLOSE-B8B),2,1)*100;
DZ1:=处女线>REF(处女线,1) AND 处女线>89;
TYP:=(HIGH+LOW+CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
CCI修正1:=EMA(EMA(EMA(CCI,2),2),2);
CCI修正2:=EMA(EMA(EMA(CCI,3),2),2);
DZ2:=CCI修正1>100;
T:=CLOSE*1.0+LOW*0.0+HIGH*0.0;
SL:=(T/REF(T,1)-1)*1000;
快:=XMA(XMA(XMA(SL,3),3),3);
慢:=XMA(XMA(XMA(SL,5),5),5);
X:=快-慢;
增速1:=X;
WWW:=REF(增速1,1)<0;
DZ4:=增速1>3 AND WWW;
DZ:=DZ1 AND DZ2 AND DZ4;
STICKLINE(DZ,0,10,4,0),COLOR00FFFF;
DRAWTEXT(DZ,10,'天牛'),COLOR00FFFF;