通达信KD1指标公式

N:=9;
M1:=3;
M2:=3;
A:=14;
A1:=14;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:SMA(RSV,M1,1);
D:SMA(K,M2,1);
金:BARSLAST(CROSS(K,D))NODRAW;死:BARSLAST(CROSS(D,K))NODRAW;
DRAWICON(CROSS(K,D),D,1); {K上穿D做记号};
DRAWICON(CROSS(D,K),K,2); {D下穿K做记号};
A80:80,DOTLINE,COLORMAGENTA,LINETHICK1;
VAR1:=C-REF(C,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
BT:(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) AND
REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
STICKLINE(UP,0,3,2,0),COLOR0000FF;
STICKLINE(DOWN,0,3,2,0),COLOR00FF00;
STICKLINE(BT,0,30,2,0),COLOR000088;
STICKLINE(BT,0,30,1,0),COLOR0000CC;
STICKLINE(BT,0,30,0.22,0),COLOR0000FF;
DRAWTEXT(BT,30,'短牛'),COLOR0000FF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
STICKLINE(TJ1,0,20,3,0),COLOR880088;
STICKLINE(TJ1,0,20,1.5,0),COLORAA00AA;
STICKLINE(TJ1,0,20,0.8,0),COLORCC00CC;
STICKLINE(TJ1,0,20,0.2,0),COLORFF00FF;
DRAWTEXT(TJ1,20,'中牛'),COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
STICKLINE(TJ2,0,10,3,0),COLOR008888;
STICKLINE(TJ2,0,10,2,0),COLOR00AAAA;
STICKLINE(TJ2,0,10,1,0),COLOR00CCCC;
STICKLINE(TJ2,0,10,0.2,0),COLOR00FFFF;
DRAWTEXT(TJ2,10,'大牛'),COLOR00FFFF;
ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);
STICKLINE(ST,100,90,2,0),COLOR008800;
STICKLINE(ST,100,90,2,0),COLOR00AA00;
STICKLINE(ST,100,90,1,0),COLOR00CC00;
STICKLINE(ST,100,90,0.2,0),COLOR00FF00;
DRAWTEXT(ST,90,'卖'),COLORFFFFFF;
DRAWICON(BT AND TJ1 AND TJ2,5,25);
上升:IF(K>REF(K,1),K,DRAWNULL),LINETHICK1,COLORRED;

通达信KD1指标公式

 

大智慧策略终端/职业股民首选分析软件:支持ACE数据,支持L2行情全推数据,支持股票池,超赢数据,价格低廉,支持月季费年费。:

下载地址:https://share.weiyun.com/LPoU0GHu