程序化指标公式
问答中心

通达信买卖KDJ副图指标公式

通达信指标 2020-08-13阅读量:2944

安装后如下图,友情提示(指标只是辅助,不作建议) 所有程序均为免费分享。

不会安装点击 安装指南 步骤操作。

J1:=(100);
RSI预设:=80;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:SMA(RSV,3,1),NODRAW;
D:SMA(K,3,1),NODRAW;
J:3*K-2*D,NODRAW;
RSV1:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9));
RSV2:=(RSV1-0.5)/5*EMA(C,21);
RSVK:=SMA(RSV2,3,1);
RSVD:=SMA(RSVK,3,1);
RSVJ:=RSVK*3-RSVD*2;
KJ:RSVK+EMA(C,21),COLORWHITE,LINETHICK1;
DJ:RSVD+EMA(C,21),COLORYELLOW,LINETHICK1;
JJ:RSVJ+EMA(C,21),COLORRED;
{需要编写选股关注微信公众号:程序化指标}
LC := REF(CLOSE,1);
AA1:=SMA(MAX(CLOSE-LC,0),6,1);
BB1:=SMA(ABS(CLOSE-LC),6,1);
RSI:AA1/BB1*100,NODRAW;
TYP := (HIGH + LOW + CLOSE)/3;
CCI:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14)),NODRAW;
买:=(CCI<-80 AND CCI>REF(CCI,1)) AND (RSI<40 AND RSI>REF(RSI,1)) AND (J<20) AND J>0;
DRAWTEXT(买,L-0.01,'●买'),COLORMAGENTA;
卖:=(CCI>90 AND CCI<REF(CCI,1)) AND (RSI>60 AND RSI<REF(RSI,1)) AND (J>80 AND J<REF(J,1));
卖21:=REF(CCI,1)>100 AND REF(RSI,1)>70 AND REF(J,1)>90 AND (CCI>REF(CCI,1) OR RSI>REF(RSI,1) OR J>REF(J,1));
卖22:=CCI>100 AND J>90 AND RSI>70 AND (CCI<REF(CCI,1) OR RSI<REF(RSI,1) OR J<REF(J,1));
卖2:=卖21 OR 卖22;
DRAWTEXT(卖,H+0.1,'●'),COLORGREEN;
DRAWTEXT(卖2,H+0.05,'●'),COLORYELLOW;
{J反推}
J11:=J;
J昨:=REF(J,1);
JX:=IF(J1=-50,J11,IF(J1=-49,J昨,J1));
XXX:=((9/7*JX-2*REF(K,1)+12/7*REF(D,1))/100)*(HHV(HIGH,9)-LLV(LOW,9))+LLV(LOW,9);
YCJ:IF(C>LC,(REF(AA1,1)*(9-1)-REF(BB1,1)*(9-1)*RSI预设/100)/(RSI预设/100-1)+LC,LC+REF(BB1,1)*(9-1)-REF(AA1,1)*(9-1)/(RSI预设/100)),NODRAW;

RYCJ:=(YCJ-REF(C,1));
RRE:=(80-REF(RSI,1));
RZZ:=RRE/RYCJ;
RH:=H-REF(C,1);
RHH:RZZ*RH+REF(RSI,1),NODRAW;

JXXX:=(XXX-REF(C,1));
JJE:=(100-REF(J,1));
JZZ:=JJE/JXXX;
JHH:JZZ*RH+REF(J,1),NODRAW;
XH:=(RHH>70 AND JHH>100) OR (RHH>80 AND JHH>90);
JRHH:=XH AND (J<JHH OR RSI<RHH);

DRAWTEXT(JRHH,H+0.1,'◆'),COLORRED;
DRAWTEXT_FIX(ISLASTBAR,0.5,0,0,STRCAT('预设J值=100 J临界股价: ',CON2STR(XXX ,2))),LINETHICK1,COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0.5,0.09,0,STRCAT('预设R值=80 R临界股价: ',CON2STR(YCJ ,2))),LINETHICK1,COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0,0,0,'图示:●=必卖'),LINETHICK1,COLORGREEN;
DRAWTEXT_FIX(ISLASTBAR,0,0.09,0,'图示:●=指标应卖 '),LINETHICK1,COLORYELLOW;
DRAWTEXT_FIX(ISLASTBAR,0,0.18,0,'图示:◆=指标超卖 '),LINETHICK1,COLORRED;


版权声明

所有指标均为免费分享。

文章内容来自互联网,本网站无任何收费项目也不推荐股票
广告投放请自行识别风险。

分享:

扫一扫在手机阅读、分享本文

程序化指标公众号

左边广告一

关闭

右边广告二

关闭