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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[通达信] 通达信自用的MACD{通用}


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

以下是通达信自用的MACD{通用}

机构和黑嘴都说有吃饭行情,看看60天线是不是一层纸,发个自用的MACD,对大家有没有用(论坛中的高手们只是说说昨天,今天。明天是两可的话。。。。说说大趋势如何,不要让小散户们天天担惊受怕)这个星期涨跌多少点都已经无所谓了(5周线已经穿13周线),下个星期5周线穿20周线,不知道如何走法。本人的看法,请勿拍砖,

{自用MACD顶底}

DIFF1:(EMA(CLOSE,12)-EMA(CLOSE,26))*10,COLORFFFFFF;

DEA1:EMA(DIFF1,9),COLORYELLOW;

JD:3*DIFF1-2*DEA1,COLORWHITE,LINETHICK2;

DRAWBAND(DIFF1,RGB(250,50,0),DEA1,RGB(50,250,0));

MACD1:=2*(DIFF1-DEA1);

MACD2:=SMA(MACD1,5,1);

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3,0),COLOR000055;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.5,0),COLOR000077;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.5,0),COLOR000099;

STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLOR0000FF;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3,0),COLOR222222;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.5,0),COLOR444444;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.5,0),COLOR666666;

STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0,0),COLOR999999;

STICKLINE(MACD1<MACD2,0,MACD1,3,0),COLORA80000;

STICKLINE(MACD1<MACD2,0,MACD1,2.5,0),COLORB80000;

STICKLINE(MACD1<MACD2,0,MACD1,1.5,0),COLOREC1000;

STICKLINE(MACD1<MACD2,0,MACD1,1,0),COLORFF4600;

STICKLINE(MACD1<MACD2,0,MACD1,0,0),COLORFFAA00;

低位金叉:=CROSS(DIFF1,DEA1) AND DIFF1<-0.1;

STICKLINE(低位金叉,0,DIFF1,3,0),COLOR002222;

STICKLINE(低位金叉,0,DIFF1,2.5,0),COLOR006666;

STICKLINE(低位金叉,0,DIFF1,1.5,0),COLOR009999;

STICKLINE(低位金叉,0,DIFF1,1,0),COLOR00FFFF;

DRAWTEXT(低位金叉,0.1,' 低位金叉'),COLOR00FF88;

JCCOUNT:=COUNT(CROSS(DIFF1,DEA1),BARSLAST(DEA1>=0));

二次金叉:=CROSS(DIFF1,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,21)=1;

STICKLINE(二次金叉,MACD1,-0.01,3,0),COLOR440044;

STICKLINE(二次金叉,MACD1,-0.01,2.5,0),COLOR660066;

STICKLINE(二次金叉,MACD1,-0.01,1.5,0),COLOR990099;

STICKLINE(二次金叉,MACD1,-0.01,1,0),COLORFF00FF;

DRAWTEXT(二次金叉,DEA1*1.3,' 二次金叉'),COLORYELLOW;

A1:=BARSLAST(REF(CROSS(DIFF1,DEA1),1));

底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF1>REF(DIFF1,A1+1) AND CROSS(DIFF1,DEA1),NODRAW;

STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;

DRAWLINE(A1=0,DEA1,底背离,DEA1,0),COLORRED;

DRAWTEXT(底背离,DEA1,' 底背离'),COLORFF00FF;

A2:=BARSLAST(REF(CROSS(DEA1,DIFF1),1));

顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF1,A2+1)>DIFF1 AND CROSS(DEA1,DIFF1),NODRAW;

DRAWLINE(A2=0,DEA1,顶背离,DEA1,0),COLORFF8800;

DRAWTEXT(顶背离,DEA1,' 顶背离'),COLORFFFF00;

DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,DEA1*1.1,'三全项'),COLOR0000FF;

微分:=SMA(MACD1,5,1),LINETHICK2,COLORMAGENTA;

力度:(MACD1-MACD2)*2,COLORYELLOW,LINETHICK2;

力10:EMA(力度,5),COLORCYAN,LINETHICK2;

力55:EMA(力度,55),COLORRED,LINETHICK2;

VAR14:=ZIG(3,13);

小苹果:IF((REF(VAR14,2)>REF(VAR14,1)) AND (VAR14>REF(VAR14,1)),1,0),NODRAW;

DRAWICON ((REF(VAR14,2)>REF(VAR14,1)) AND (VAR14>REF(VAR14,1)),MACD1,16);{小苹果}

金手指:ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2),NODRAW;

DRAWICON (金手指=1,MACD1*0.96,11);{金手指};





回复

举报

QQ|

GMT+8, 2024-11-17 10:33

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