首页 > 编程语言 >通达信金牌MACD副图提示顶底源码

通达信金牌MACD副图提示顶底源码

时间:2024-01-25 19:44:27浏览次数:29  
标签:DIF CROSS 通达信 源码 顶底 NODRAW REF MACD INTPART

XA:=DATE<=20240115;
DIF:(EMA(C,12)XA-EMA(C,26))XA,COLORF0F0F0;
DEA:EMA(DIF,9)XA,COLOR00DCDC;
MACD:2
(DIF-DEA)XA,COLORSTICK;
STICKLINE(MACD>REF(MACD,1) AND MACD>=0,MACD,0,10/3,0),COLORRED;
STICKLINE(MACD>REF(MACD,1) AND MACD<0,MACD,0,10/3,1),COLORRED;
FH1:=REF(MACD,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
STICKLINE(FH3 OR FH4 OR FH5,0,MACD,10/3,0),COLORMAGENTA;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,10/3,0),COLORGREEN;
STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,10/3,1),COLORYELLOW;
红中红:FH3 OR FH4 OR FH5,NODRAW;
MACD2:=MACD
XA;
MJ:=MACDXA;
S05:=SUM(MJ,0);
QST:=BARSLAST(MJ<0 AND REF(MJ,1)>0)+1;
QXT:=BARSLAST(MJ>0 AND REF(MJ,1)<0)+1;
S5:=IF(MJ>0,S05-REF(S05,BARSLAST(MJ<0)),S05-REF(S05,BARSLAST(MJ>0)))/10;
ST:=IF(MJ>0,REF(QST,QXT)+QXT,REF(QXT,QST)+QST);
RS5:=REF(S5,ST)
XA;
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,0,25);
三次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,60)=1;
DRAWICON(三次金叉,0,26);
A002:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A002+1)>CLOSE AND DIF>REF(DIF,A002+1) AND CROSS(DIF,DEA);
DRAWICON(LONGCROSS(CLOSE,MA(CLOSE,5),17),MACD2,1);
DRAWTEXT(二次金叉>低位金叉,DIF,'金2'),COLORRED;
C81:=REF(C,1);
RN:=9;
RSI1:=SMA(MAX(C-C81,0),RN,1)/SMA(ABS(C-C81),RN,1)100;
低点:=CROSS(RSI1,20);
STICKLINE(低点,0.1,0,0,0),COLORYELLOW;
DRAWICON(低点, 0.15,1);
DRAWTEXT(低点, 0.14,'←底'),COLORYELLOW;
顶:=CROSS(80,RSI1);
DRAWICON(顶, DIF
1.15,2);
DRAWTEXT(顶, DIF1.1,'←减/清仓'),COLORGREEN;
死叉:=CROSS(DEA,DIF);
N1:=BARSLAST(死叉),NODRAW;
N2:=REF(BARSLAST(死叉),N1+1),NODRAW;
N3:=REF(BARSLAST(死叉),N2+N1+2),NODRAW;
CL1:=LLV(C,N1+1),NODRAW;
DIFL1:=LLV(DIF,N1+1),NODRAW;
CL2:=REF(CL1,N1+1),NODRAW;
DIFL2:=REF(DIFL1,N1+1),NODRAW;
CL3:=REF(CL2,N1+1),NODRAW;
DIFL3:=REF(DIFL2,N1+1),NODRAW;
PDIFL2:=IF(DIFL2>0,INTPART(LOG(DIFL2))-1,INTPART(LOG(-DIFL2))-1);
MDIFL2:=INTPART(DIFL2/POW(10,PDIFL2));
PDIFL3:=IF(DIFL3>0,INTPART(LOG(DIFL3))-1,INTPART(LOG(-DIFL3))-1);
MDIFL3:=INTPART(DIFL3/POW(10,PDIFL3));
MDIFB2:=INTPART(DIF/POW(10,PDIFL2));
MDIFB3:=INTPART(DIF/POW(10,PDIFL3));
直接底背离:=(CL1<CL2 ) AND (MDIFB2>MDIFL2) AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB2<=REF(MDIFB2,1);
隔峰底背离:=(CL1<CL3 AND CL3<CL2 ) AND (MDIFB3>MDIFL3) AND (MACD<0 AND REF(MACD,1)<0) AND MDIFB3<=REF(MDIFB3,1);
B6:直接底背离 OR 隔峰底背离,NODRAW;
BG:((MDIFB2>REF(MDIFB2,1))
REF(直接底背离,1)) OR ((MDIFB3>REF(MDIFB3,1))REF(隔峰底背离,1)),NODRAW;
底背离消失:=(REF(直接底背离,1) AND DIFL1<=DIFL2 ) OR (REF(隔峰底背离,1) AND DIFL1<=DIFL3);
金叉:=CROSS(DIF,DEA);
M1:=BARSLAST(金叉),NODRAW;
M2:=REF(BARSLAST(金叉),M1+1),NODRAW;
M3:=REF(BARSLAST(金叉),M2+M1+2),NODRAW;
CH1:=HHV(C,M1+1),NODRAW;
DIFH1:=HHV(DIF,M1+1),NODRAW;
CH2:=REF(CH1,M1+1),NODRAW;
DIFH2:=REF(DIFH1,M1+1),NODRAW;
CH3:=REF(CH2,M1+1),NODRAW;
DIFH3:=REF(DIFH2,M1+1),NODRAW;
PDIFH2:=IF(DIFH2>0,INTPART(LOG(DIFH2))-1,INTPART(LOG(-DIFH2))-1);
MDIFH2:=INTPART(DIFH2/POW(10,PDIFH2));
PDIFH3:=IF(DIFH3>0,INTPART(LOG(DIFH3))-1,INTPART(LOG(-DIFH3))-1);
MDIFH3:=INTPART(DIFH3/POW(10,PDIFH3));
MDIFT2:=INTPART(DIF/POW(10,PDIFH2));
MDIFT3:=INTPART(DIF/POW(10,PDIFH3));
直接顶背离:=(CH1>CH2 ) AND (MDIFT2<MDIFH2) AND (MACD>0 AND REF(MACD,1)>0) AND MDIFT2>=REF(MDIFT2,1);
隔峰顶背离:=(CH1>CH3 AND CH3>CH2 ) AND (MDIFT3<MDIFH3) AND (MACD>0 AND REF(MACD,1)>0) AND MDIFT3>=REF(MDIFT3,1);
T6:直接顶背离 OR 隔峰顶背离,NODRAW;
TG:((MDIFT2<REF(MDIFT2,1))
REF(直接顶背离,1)) OR ((MDIFT3<REF(MDIFT3,1))REF(隔峰顶背离,1)),NODRAW;
顶背离消失:=(REF(直接顶背离,1) AND DIFH1>=DIFH2 ) OR (REF(隔峰顶背离,1) AND DIFH1>=DIFH3);
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
DRAWTEXT_FIX(C>O,0.01,0,0,'公式平台,公式源码http://www.gspt.com'),COLOR333333;
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1"
AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(B2>0,DIF
1.2,'K底'),COLORFF00FF;
DRAWTEXT(D2>0,DIF1.2,'K顶'),COLORFFCC66;
DRAWTEXT(B3>0,DIF
1,'R底'),COLORYELLOW;
DRAWTEXT(D3>0,DIF*1,'R顶'),COLORFFFFFF;

标签:DIF,CROSS,通达信,源码,顶底,NODRAW,REF,MACD,INTPART
From: https://www.cnblogs.com/zhibiao/p/17988015

相关文章

  • 解密在线教育系统源码:定制化企业培训的利器
    当下,在线教育系统的出现,不仅突破了时空的束缚,更为企业提供了灵活、高效的培训方式。解密在线教育系统源码,对于企业而言,就如同拥有了一把定制化企业培训的利器。一、解析在线教育系统源码1.前端技术栈的选择在搭建在线教育系统时,选择合适的前端技术栈至关重要。通过深度定制前端界面......
  • 源码分析:线程池里新增一个线程的流程是什么
    1、先判断新线程是不是为空,为空就报空指针错误否则就往下运行;2、判断是否小于核心线程数,小于则直接新增线程否则就往下运行;3、尝试新增到工作队列中,添加成功就等待调用否则就往下运行;4、再次尝试新增线程,如果当前线程池的线程数大于线程池容量或最大线程数就触发拒绝策略。......
  • 源码文件阅读---hooks的使用---使用文心一言读代码
    import{CommonFormTypes}from'globalConstants';import{createContext,useCallback,useState}from'react';import{BoardType}from'../../../DashBoardPage/pages/Board/slice/types';import{VizType}from'./slic......
  • 通达信牛筹码主图指标 超短筹 短中长筹码统计 源码附图
    源码解析:筹码集中度赋值:(获利盘为90+(100-90)/2%的成本分布-获利盘为(100-90)/2%的成本分布)/(获利盘为90+(100-90)/2%的成本分布+获利盘为(100-90)/2%的成本分布)+收盘价输出超短筹:筹码集中度的10日指数移动平均的3日简单移动平均输出短筹:筹码集中度的20日指数移动平均的3日......
  • SAP dialog使用选择屏幕+容器展现 步骤+源码
    系统自带的选择都是单选的,但是需求不一定是单选的,那么需要和选择屏幕一样的范围选择要怎么做呢,以下是一个样例,通过查询物料号来展现物料表的数据。9000屏幕创建屏幕设置屏幕类型布局编辑构建一个子屏幕subscreen用于防止选择屏幕,构建一个客制化容器contain用于存放......
  • win10 下载 Chromium 源码并编译
      https://www.yangdx.com/2022/07/215.html 辅助看 https://blog.csdn.net/weixin_42081389/article/details/132127613 上面的走完,在编译的时候 下载ninja-win.zip下面放到pathhttps://github.com/ninja-build/ninja/releases cmd要管理员权限   报......
  • Nacos源码下载与运行
    早先在linux环境下搭建过nacos环境即Centos安装部署nacos实战,本次是从官网上下载源码,本地运行看看,记录过程,方便备查。第一步、Nacos源码下载推荐到nacos官网下载Github地址,本次选择最新版,1.4.7版本,可下载Sourcecode源码,解压即可,如下图所示。解压后的目标结构如下所示,关注conf......
  • 源码包的部署
    例:安装nginx1、解压nginx[root@fishman-160~]#tar-zxvfnginx-1.25.1.tar.gz2、编译[root@fishman-160nginx-1.25.1]#./configure--prefix=/usr/local/nginx#prefiex指定安装路径checkingforOS+Linux4.18.0-500.el8.x86_64x86_64checkingforCcompiler........
  • 深入解析互联网医院APP开发流程与源码搭建
    本篇文章,深入解析互联网医院APP的开发流程,并提供关于源码搭建的一些建议。 一、确定需求与功能在开始互联网医院APP的开发之前,首先需要明确项目的需求和功能。这包括用户端的预约挂号、在线咨询、报告查看等功能,以及医生端的排班管理、病历查看等功能。确保需求明确,有助于后续的流......
  • openssh9.6 源码编译与交叉编译
    环境ubunut18.04。x86平台openssh9.6,这里我是要移植到别的机器。不是在本地使用所以我要编出两个版本x86和armubunutx86版本编译过程准备工作安装依赖库,可以通过apt包管理安装,也可以源码安装,我们这里需要zlib,openssl和pamlinux安装pam库centossudoyuminstall......