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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 「指标」MACD背离金叉副图指标 源码 通达信


    [-----复制链接-----]

22万

主题

22万

帖子

14

精华

积分
11042
楼主
2024-1-9 13:04:03
【资料名称】:MACD背离金叉副图指标 源码 通达信介绍
【资料描述】:

MACD背离金叉副图指标 源码 通达信






DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
DRAWICON(低位金叉,DEA*0.9,1) ;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,DEA*0.9,5) ;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND
CROSS(DIFF,DEA);
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,-1,' 底背'),COLORRED;
DRAWICON(CROSS(DEA,DIFF),DIFF,2);
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND
CROSS(DEA,DIFF);
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;
DRAWTEXT(顶背离,1,' 顶背'),COLORGREEN;
三全项:=(低位金叉 AND 二次金叉 AND 底背离);
STICKLINE(三全项,0,0.8,1,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,1,'三全项'),COLORYELLOW;
MACD值:2*(DIFF-DEA),COLORSTICK,COLORRED;
VAR8:=SUM(MACD值,0);
VAR9:=IF(MAX(VAR8,REF(VAR8,2))<REF(VAR8,1) OR MIN(VAR8,REF(VAR8,2))>REF(VAR8,1),1,0);
VAR10:=BARSLAST(VAR9)+1;
VAR11:=VAR8-REF(VAR8,VAR10);
VAR12:=IF(MACD值>0,HHV(ABS(MACD值),VAR10),LLV(MACD值,VAR10));
VAR13:=MACD值/20;

红面积:SUM(MACD,BARSLAST(MACD<0))*(MACD>0),COLOR0000FF,NODRAW;
绿面积:SUM(MACD,BARSLAST(MACD>0))*(MACD<0),COLORFFFF00,NODRAW;
AA:=ROUND(REF(绿面积,1)*100);BB:=ROUND(REF(红面积,1)*100);
DRAWNUMBER(CROSS(0,MACD),HHV(REF(MACD,1),5)+0.03,ABS(BB)),COLORMAGENTA;
DRAWNUMBER(CROSS(MACD,0),LLV(REF(MACD,1),5)-0.03,ABS(AA)),COLORGREEN;
 



gd57564


【下载地址隐藏】:                    点:回复可见地址
游客,如果您要查看本帖隐藏内容请回复






上一篇:「指标」大盘个股晴雨表主图指标 源码 通达信 贴图
下一篇:「指标」桂氏买卖波段副图指标 源码 通达信 贴图 无未来
回复

举报

QQ|

GMT+8, 2024-11-24 10:25

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