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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[飞狐] 三线合一 RSI-CCI-KD}FH,L2,TDX 源码


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

以下是三线合一 RSI-CCI-KD}FH,L2,TDX 源码

飞狐-原码
{RSI-CCI-KD}
input:N(9,2,100),M(14,1,100),N1(6,2,100);
TYP := (HIGH + LOW + CLOSE)/3;
CC1:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),ColorFF00FF;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
FILLRGN(CC1>100,CC1,100),ColorFFFF00;
FILLRGN(CC1<-100,CC1,-100),COLOR00AAFF;
FILLRGN(CC1<>100,100,-100),COLOR000000;
CC2:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),ColorFF00FF;
100,LINEDOT;
-100,LINEDOT;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI:(RSI1-50)*5.3,LINETHICK2,ColorFFFFFF;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1>RR2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
K1:(K-50)*5,,Color00FF00;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
买入:RR AND NOT(REF(RR,1)) AND (RR1<-100 AND BB1<-100) AND CB1<-100,LINETHICK0;
DRAWICON(买入,-200,4),ALIGN0;
卖出:REF(RR,1)=1 AND NOT(RR) AND CB1>100,LINETHICK0;
DRAWICON(卖出,200,5),ALIGN0;
通信达原码一直没推出主要是没解决上下彩带同时显示。搞出来的东西要对得起使用者,看到有人不加任何创造性的东西,把原公试移植到同信达,使原公式表现意图面目全非真是无言以对。晚上来了灵感一下子解决了彩带控制。请使用通信达的朋友笑纳。不希望有的人拿别人的劳动成果去赚钱!
通信达( 输入参数见1721楼)
{INPUT:N(2,100,9),M(1,100,14),N1(2,100,6);}
100,POINTDOT;
-100,POINTDOT;
TYP := (HIGH + LOW + CLOSE)/3;
CC1:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLORFF00FF;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
DRAWBAND(CC1,RGB(0,244,244),0,RGB(255,200,90));
DRAWBAND(100,0,-100,0);
100,POINTDOT;
-100,POINTDOT;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI:(RSI1-50)*5,LINETHICK2,COLORFFFFFF;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1>RR2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
K1:(K-50)*5,COLOR00FF00;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
买入:RR AND NOT(REF(RR,1)) AND (RR1<-100 AND BB1<-100) AND CB1<-100,LINETHICK0;
DRAWICON(买入,-200,1);
卖出:REF(RR,1)=1 AND NOT(RR) AND CB1>100,LINETHICK0;
DRAWICON(卖出,200,2);
100,POINTDOT;
-100,POINTDOT,COLOR52F8FF;
CC2:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),COLORFF00FF;

顺便将公式表现意图汇报一下;图形RSI采用白色粗曲线体现其主导地位,CCI在100以上区间采用蓝色彩带顶部预警和-100以下区间金色彩带底部续势待涨,结合CCI战法一目了然。公式的高成功率(按20天涨幅5%会更高)能在关键顶底发出买卖信号,希望给使用的朋友带来好运。
大智慧L2

{RSI-CCI-KD}
{input:N(9,2,100),M(14,1,100),N1(6,2,100);}
TYP := (HIGH + LOW + CLOSE)/3;
CC1:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),ColorFF00FF;
C1:=SMA(CC1,3,1);
C2:=SMA(C1,3,1);
C3:=3*C1-2*C2;
CB1:=EMA(C3,5);
CB2:=REF(CB1,1);
FILLRGN(CC1,100,CC1>100),ColorFFFF00;
FILLRGN(CC1,-100,CC1<-100),COLOR00AAFF;
FILLRGN(100,-100,CC1<>100),COLOR000000;
LC := REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI:(RSI1-50)*5,LINETHICK2,ColorFFFFFF;
R1:=SMA(RSI,3,1);
D1:=SMA(R1,3,1);
J1:=3*R1-2*D1;
RR1:=EMA(J1,5);
RR2:=REF(RR1,1);
RR:=RR1>RR2;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,3,1);
K1:(K-50)*5,Color00FF00;
K2:=SMA(K1,3,1);
D2:=SMA(K2,3,1);
J2:=3*K2-2*D2;
BB1:=EMA(J2,5);
BB2:=REF(BB1,1);
买入:RR AND NOT(REF(RR,1)) AND (RR1<-100 AND BB1<-100) AND CB1<-100,LINETHICK0;
DRAWICON(买入,-200,7),ALIGN0;
卖出:REF(RR,1)=1 AND NOT(RR) AND CB1>100,LINETHICK0;
DRAWICON(卖出,200,8),ALIGN0;
100,POINTDOT;
-100,POINTDOT;
CC2:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M)),ColorFF00FF;

CCI,RSI,KD, 是大家常用的公式,三个公式整合在一起结合各自的买卖原则成功率更高。三线
底部共振为买入信号,三线高位共振为卖出信号。








回复

举报

QQ|

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

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