股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信股林KD指标公式源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-5-11 17:24:44

N:=9;
M1:=3;
M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
周K:="kd.K#WEEK"(9,3,3),COLORGREEN;
周D:="KD.D#WEEK"(9,3,3),COLORLICYAN;
月K:"KD.K#MONTH"(9,3,3),COLORMAGENTA;
月D:"KD.D#MONTH"(9,3,3),COLORLIRED;
STICKLINE(K>D AND 周K>周D AND 月K>月D,-20,120,1,0),COLOR663355;
DRAWBAND(月K,RGB(120,0,0),月D,RGB(0,0,200));
{DRAWBAND(周K,RGB(255,97,0),周D,RGB(0,128,0));}
RK:=REF(K,1)>80 AND REF(K,2)>80 AND REF(K,3)>80;
ZK:=REF(周K,1)>80 AND REF(周K,2)>80 AND REF(周K,3)>80;
YK:=REF(月K,1)>80 AND REF(月K,2)>80 AND REF(月K,3)>80;
RK1:=REF(K,1)<20 AND REF(K,2)<20 AND REF(K,3)<20;
ZK1:=REF(周K,1)<20 AND REF(周K,2)<20 AND REF(周K,3)<20;
YK1:=REF(月K,1)<20 AND REF(月K,2)<20 AND REF(月K,3)<20;
DRAWICON(RK,90,27);
DRAWICON(RK1,10,28);
DRAWICON(ZK,100,26);
DRAWICON(ZK1,0,29);
DRAWICON(YK,110,25);
DRAWICON(YK1,-10,30);
DRAWICON(RK AND ZK AND YK,120,9);
DRAWICON(RK1 AND ZK1 AND YK1,-20,13);
A1:=IF(K>D,1,0);
A2:=IF(周K>周D,2,0);
A3:=IF(月K>月D,3,0);
A4:=IF(K>D AND 周K>周D AND 月K>月D,4,0);
看多:A1+A2+A3+A4,COLORYELLOW POINTDOT;
看空:10-看多,COLORYELLOW POINTDOT;
bbi:=(EMA(CLOSE,3)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4;
EBBI:=(EMA(C,6)+EMA(C,18)+EMA(C,54)+EMA(C,162))/4;
FF1:=EMA(C,3)>EMA(C,7) AND EMA(C,7)>EMA(C,21) AND EMA(C,21)>EMA(C,54);
DIFF:=EMA(CLOSE,10)-EMA(CLOSE,22);
DEA:=EMA(DIFF,9);
强势:=IF(BBI>EBBI AND FF1 AND DIFF>DEA,10,0),COLORYELLOW;
STICKLINE(强势,10,0,1,0),COLORYELLOW;
{DRAWICON(crOSS(K1,D1) AND CROSS(J1,D1),10,1)};{1号图标显示红箭头};
STICKLINE(周K>周D,周K,周D,1,-1),COLORYELLOW;
STICKLINE(周K<周D,周K,周D,1,-1),COLORFF9900;
K1:SMA(RSV,M1,1),COLORWHITE;
D1:SMA(K,M2,1),COLORYELLOW;
J1:3*K-2*D,COLORMAGENTA;
DRAWICON(CROSS(J,2),J,1);





回复

举报

QQ|

GMT+8, 2024-11-17 01:57

快速回复 返回顶部 返回列表