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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[同花顺] 同花顺KDJ顶底背离副图指标 源码


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-29 17:46:55
同花顺KDJ顶底背离副图指标 源码介绍

同花顺KDJ顶底背离副图指标 源码

这个KDJ指标与系统默认的有些不同,J值上不封顶下不封底。





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;
D: EMA(0.667*REF(K,1)+0.333*K,2),colorgreen,LINETHICK1;
DRAWICON(CROSS(K,d),d,'buy');
DRAWICON(CROSS(d,k),k,'sell');
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;
DRAWICON(CROSS(K,d),d,'buy');
DRAWICON(CROSS(d,k),k,'sell');
低位金:=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;
低位金:=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;




 



gd46050

回复

举报

QQ|

GMT+8, 2024-11-17 21:37

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