同花顺KD强化版指标公式

[复制链接]
查看152 | 回复0 | 2021-8-20 21:35:27 | 显示全部楼层 |阅读模式

N:=36;
M1:=5;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1),LINETHICK1;
D:SMA(K,M1,1),LINETHICK1;
J:3*K-2*D;
低位金:=CROSS(K,D) AND D<20;
STICKLINE(低位金,D,D+8,5,0),coloryellow;
JCCOUNT:=COUNT(CROSS(K,D),BARSLAST(K>=D));
二次金:=CROSS(K,D) AND D<20 AND COUNT(JCCOUNT=2,34)=1;
STICKLINE(二次金,D,D+5,5,0),COLORFF80FF;
DRAWICON(二次金,D*0.85,1) ;
A1:=BARSLAST(REF(CROSS(K,D),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND K>REF(K,A1+1) AND CROSS(K,D);
STICKLINE(底背离,D,D+5,5,0),colorred;
DRAWLINE(A1=0,D,底背离,D,0),colorred,LINETHICK2;
DRAWTEXT(底背离>0,J,'底背离'),colorred;
A2:=BARSLAST(REF(CROSS(D,K),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(D,A2+1)>D AND CROSS(D,K);
DRAWLINE(A2=0,D,顶背离,D,0),colorgreen,LINETHICK2;
DRAWTEXT(顶背离>0,K+2,'顶背离'),colorgreen;
IF(K>90,K,DRAWNULL),COLOR0000FF,LINETHICK2;
IF(D>85,D,DRAWNULL),colorgreen,LINETHICK2;
DRAWICON(K>80 AND D>80 AND CROSS(D,K),D,2),LINETHICK2;
大顶:90,colorlired;
小顶:80,colorcyan;
中轴:50,colorwhite;
观望:20,colorligreen;
{"均线系统";}
N1:=5;
N2:=10;
N3:=20;
N4:=30;
EMA7:=EMA(C,7);
BBI:=(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;
过渡:IF(BBI,10,DRAWNULL),colorwhite,LINETHICK1;
持股:IF(C>BBI AND BBI>REF(BBI,1),10,DRAWNULL), colorred,LINETHICK1;
持币:IF(C<=BBI AND BBI<=REF(BBI,1),10,DRAWNULL),colorgreen,LINETHICK1;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
YXF:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
蓝:IF(FILTER(YXF=1,5),20,0),colorliblue,LINETHICK1;
红: IF(FILTER(YXF=1,5),10,0),colorred,LINETHICK1;
黄: IF(FILTER(YXF=1,5),5,0),coloryellow,LINETHICK1;
LOWV:=LLV(LOW,N);
HIGHV:=HHV(HIGH,N);
var1:=REF(CLOSE,1);
var2:=SMA(MAX(CLOSE-var1,0),7,1)/SMA(ABS(CLOSE-var1),7,1)*100,coloryellow;
var21:IF(var2<20,40,20),colorgreen;
var22:IF(var2>80,60,80),COLORFFFF50;
var2↑:STICKLINE(FILTER(REF(var2,1)<20 AND var2>REF(var2,1),5),20,40,8,0),colorgreen;
var2↓:STICKLINE(FILTER(REF(var2,1)>80 AND var2<REF(var2,1),5),60,80,8,0),colorgreen;
DIF:EMA(CLOSE,9)-EMA(CLOSE,26),NODRAW;
DEA:EMA(DIF,12),NODRAW;
MACD:2*(DIF-DEA),COLORSTICK;
DIK:4*DIF-3*DEA,coloryellow;
DED:=EMA(DIK,1),colorgreen;
IF(C>DED,DED,DRAWNULL),colorred,LINETHICK3;
IF(DED<=REF(DED,1),DED,DRAWNULL),colorgreen,LINETHICK3;
启动点:=MACD<0 AND MACD>REF(MACD ,1) AND REF(MACD ,1)<REF(MACD ,2)
AND REF(MACD ,2)<REF(MACD ,3)
AND REF(MACD ,3)<REF(MACD ,4);
STICKLINE(启动点,8,MACD,2,0),colormagenta;
分界线:50,colorliyellow;
DRAWICON(启动点,20,11);

202108202132.jpg

202108202132.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则