投股票网 www.tou18.cn [今日股市行情 股市在线查询 股票大盘行情] 股市有风险 投资需谨慎 手机APP下载 | 手机访问 | 加入收藏 | 保存到桌面
投股票网
今日股市行情 股市在线查询 股票大盘行情
个股查询: 资金行情 DDX查询 大智慧超赢 同花顺DDE 千股千评 最新提示 股票公告 投资要点 评级查询 大小非 股东 增发配股 股权 高管 股票概况
当前位置: 投股票网 > 股市公式下载 > 通达信公式
股市公式查询:

通达信真MACD日周指标公式

2020/10/11 19:04:31

{周MACD柱线}
MACD周:=MACD.MACD#WEEK,NODRAW;
STICKLINE(MACD周>=0,0,MACD周,4.2,0),COLOR0080FF;
STICKLINE(MACD周>=0 AND MACD周<REF(MACD周,WEEKDAY),0,MACD周,4.2,0),COLORLIBLUE;
STICKLINE(MACD周<0,0,MACD周,4.2,0),COLORLIBLUE;
STICKLINE(MACD周<0 AND MACD周>REF(MACD周,WEEKDAY),0,MACD周,4.2,0),COLOR0080FF;
{日MACD的柱线}
MACD2:=2*("MACD.DIF" - "MACD.DEA");
STICKLINE(MACD2>=0,0,MACD2,1.4,0),COLOR000096;
STICKLINE(MACD2>=0,0,MACD2,1.2,0),COLOR0000A5;
STICKLINE(MACD2>=0,0,MACD2,1.0,0),COLOR0000B4;
STICKLINE(MACD2>=0,0,MACD2,0.8,0),COLOR0000C3;
STICKLINE(MACD2>=0,0,MACD2,0.6,0),COLOR0000D2;
STICKLINE(MACD2>=0,0,MACD2,0.4,0),COLOR0000E1;
STICKLINE(MACD2>=0,0,MACD2,0.2,0),COLOR0000F0;
STICKLINE(MACD2>=0,0,MACD2,0.05,0),COLOR0000FF;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,1.4,0),COLOR009600;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,1.2,0),COLOR00A500;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,1.0,0),COLOR00B400;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.8,0),COLOR00C300;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.6,0),COLOR00D200;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.4,0),COLOR00E100;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.2,0),COLOR00F000;
STICKLINE(MACD2>=0 AND MACD2<REF(MACD2,1),0,MACD2,0.05,0),COLOR00FF00;
STICKLINE(MACD2<0,0,MACD2,1.4,0),COLOR009600;
STICKLINE(MACD2<0,0,MACD2,1.2,0),COLOR00A500;
STICKLINE(MACD2<0,0,MACD2,1.0,0),COLOR00B400;
STICKLINE(MACD2<0,0,MACD2,0.8,0),COLOR00C300;
STICKLINE(MACD2<0,0,MACD2,0.6,0),COLOR00D200;
STICKLINE(MACD2<0,0,MACD2,0.4,0),COLOR00E100;
STICKLINE(MACD2<0,0,MACD2,0.2,0),COLOR00F000;
STICKLINE(MACD2<0,0,MACD2,0.05,0),COLOR00FF00;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,1.4,0),COLOR000096;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,1.2,0),COLOR0000A5;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,1.0,0),COLOR0000B4;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.8,0),COLOR0000C3;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.6,0),COLOR0000D2;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.4,0),COLOR0000E1;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.2,0),COLOR0000F0;
STICKLINE(MACD2<0 AND MACD2>REF(MACD2,1),0,MACD2,0.05,0),COLOR0000FF;
{周DIF,周DEA}
周DIF:MACD.DIF#WEEK,COLORGRAY,NODRAW;
周DEA:MACD.DEA#WEEK,COLORGRAY,NODRAW;
周金叉:=周DIF>周DEA;
周死叉:=周DIF<周DEA;
STICKLINE(周金叉,周DIF,周DEA,0,0),COLOR008080;
STICKLINE(周死叉,周DIF,周DEA,0,0),COLORBLUE;
{MACD周线的背离}
ZA1:=BARSLAST(REF(CROSS(周DIF,周DEA),1));
周底背离:=REF(CLOSE,ZA1+1)>CLOSE AND 周DIF>REF(周DIF,ZA1+1) AND CROSS(周DIF,周DEA);
ZA2:=BARSLAST(REF(CROSS(周DEA,周DIF),1));
周顶背离:=REF(CLOSE,ZA2+1)<CLOSE AND REF(周DIF,ZA2+1)>周DIF AND CROSS(周DEA,周DIF);
DRAWTEXT(周底背离,周DIF*1.02,'周底背'),COLORWHITE;
DRAWTEXT(周顶背离,周DIF*1.02,'周顶背'),COLORGREEN;
{日线DIF和DEA}
DIF:EMA(CLOSE,12)-EMA(CLOSE,26)COLORLIMAGENTA,LINETHICK2;
DEA:EMA(DIF,9)COLORFF0080;
MACD:2*(DIF-DEA)COLORWHITE,NODRAW;
{MACD日线底背离}
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
DRAWTEXT(底背离,DIF*1,'日底背'),COLORWHITE;
{MACD日线顶背离}
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
DRAWTEXT(顶背离,DIF*1,'日顶背'),COLORGREEN;
{MACD_KDJ的金叉共振}
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9));
K:=SMA(RSV,9,3),NODRAW;
D:=SMA(K,9,3),NODRAW;
J:=3*K-2*D,NODRAW;
A:=CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(J,D);
DRAWTEXT(A,DIF*1.5,'MACD_KDJ金叉共振'),COLORWHITE;

投股 票网 www.tou 18.cn

股市公式下载推荐
投股票网股市查询:资金行情查询 实时DDX查询 大智慧超赢 千股千评 最新提示 股票公告 投资要点 评级查询 股东查询 增发配股查询 股权结构查询
雅化集团 002497+5.74% 评股 实时DDX 大智慧 最新消息 题材分析 股权
红星发展 600367+5.72% 评股 实时DDX 大智慧 最新消息 题材分析 股权
莱克电气 603355+5.58% 评股 实时DDX 大智慧 最新消息 题材分析 股权
亿华通 688339+5.56% 评股 实时DDX 大智慧 最新消息 题材分析 股权
扬帆新材 300637+5.56% 评股 实时DDX 大智慧 最新消息 题材分析 股权
亿利达 002686+5.56% 评股 实时DDX 大智慧 最新消息 题材分析 股权
中颖电子 300327+5.54% 评股 实时DDX 大智慧 最新消息 题材分析 股权
四方光电 688665+5.51% 评股 实时DDX 大智慧 最新消息 题材分析 股权
泛亚微透 688386+5.49% 评股 实时DDX 大智慧 最新消息 题材分析 股权
明微电子 688699+5.47% 评股 实时DDX 大智慧 最新消息 题材分析 股权
联系我们:nmsy8@hotmail.com 友情链接 要求相关的财经股票网站 今日股市行情在线查询
本站不推荐任何股票,站内广告不代表投股票网的观点,由此引起的一切法律责任均与本站无关,请网民自行判断真假,谨防网上股票预测诈骗!
本站所有内容仅供参考,不构成投资建议,据此操作,风险自担。本站不为所提供数据的错误或因依此信息所采取的任何行为负责。
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-120