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

通达信MACD短期指标公式

2021/2/4 19:12:09

SHORT:=12;
LONG:=26;
MID:=9;
DIFF :(EMA(C,SHORT) - EMA(C,LONG))*1000;
DEA :EMA(DIFF,MID);
MACD :2*(DIFF-DEA),COLORSTICK;
A0:=BARSLAST(REF(CROSS(DEA,0),1));
A1:=BARSLAST(CROSS(DEA,DIFF));
A2:=REF(BARSLAST(CROSS(DEA,DIFF)),A1+1);
A3:=REF(BARSLAST(CROSS(DEA,DIFF)),A2+A1+2);
A4:=REF(BARSLAST(CROSS(DEA,DIFF)),A3+A2+A1+3);
A5:=REF(BARSLAST(CROSS(DEA,DIFF)),A4+A3+A2+A1+4);
A11:=LLV(C,A1)<REF(LLV(C,A1+1),A1+1) AND LLV(DIFF,A1)>REF(LLV(DIFF,A1+1),A1+1);
A22:=LLV(C,A1)<REF(LLV(C,A1+A2+2),A1+A2+2) AND
LLV(DIFF,A1)>REF(LLV(DIFF,A1+A2+2),A1+A2+2);
A33:=LLV(C,A1)<REF(LLV(C,A1+A2+A3+3),A1+A2+A3+3) AND
LLV(DIFF,A1)>REF(LLV(DIFF,A1+A2+A3+3),A1+A2+A3+3);
A44:=LLV(C,A1)<REF(LLV(C,A1+A2+A3+A4+4),A1+A2+A3+A4+4) AND
LLV(DIFF,A1)>REF(LLV(DIFF,A1+A2+A3+A4+4),A1+A2+A3+A4+4) AND A11 AND A22 AND A33;
A55:=LLV(C,A1)<REF(LLV(C,A1+A2+A3+A4+A5+5),A1+A2+A3+A4+A5+5) AND
LLV(DIFF,A1)>REF(LLV(DIFF,A1+A2+A3+A4+A5+5),A1+A2+A3+A4+A5+5) AND A11 AND A22 AND A33
AND A44;
DIBL:=(A11 OR A22 OR A33 OR A44 OR A55) AND DIFF<0 AND REF(COUNT(MACD<0,2)=2,1) AND CROSS(DIFF,DEA);
DIBL1:=(A11 OR A22 OR A33 OR A44 OR A55) AND DIFF<0 AND DIFF<DEA AND DIFF>REF(DIFF,1)
AND DIFF>REF(DIFF,2);
底背离:IF(DIBL,0,DEA),COLORRED;
IF(DIFF<0 AND CROSS(DIFF,DEA) AND DIBL=0,0,DEA),COLORYELLOW;
B0:=BARSLAST(REF(CROSS(0,DEA),1));
B1:=BARSLAST(CROSS(DIFF,DEA));
B2:=REF(BARSLAST(CROSS(DIFF,DEA)),B1+1);
B3:=REF(BARSLAST(CROSS(DIFF,DEA)),B1+B2+2);
B4:=REF(BARSLAST(CROSS(DIFF,DEA)),B1+B2+B3+3);
B5:=REF(BARSLAST(CROSS(DIFF,DEA)),B1+B2+B3+B4+4);
B11:=HHV(C,B1)>REF(HHV(C,B1+1),B1+1) AND HHV(DIFF,B1)<REF(HHV(DIFF,B1+1),B1+1);
B22:=HHV(C,B1)>REF(HHV(C,B1+B2+2),B1+B2+2) AND
HHV(DIFF,B1)<REF(HHV(DIFF,B1+B2+2),B1+B2+2);
B33:=HHV(C,B1)>REF(HHV(C,B1+B2+B3+3),B1+B2+B3+3) AND
HHV(DIFF,B1)<REF(HHV(DIFF,B1+B2+B3+3),B1+B2+B3+3);
B44:=HHV(C,B1)>REF(HHV(C,B1+B2+B3+B4+4),B1+B2+B3+B4+4) AND
HHV(DIFF,B1)<REF(HHV(DIFF,B1+B2+B3+B4+4),B1+B2+B3+B4+4) AND B11 AND B22 AND B33;
B55:=HHV(C,B1)>REF(HHV(C,B1+B2+B3+B4+B5+5),B1+B2+B3+B4+B5+5) AND
HHV(DIFF,B1)<REF(HHV(DIFF,B1+B2+B3+B4+B5+5),B1+B2+B3+B4+B5+5) AND B11 AND B22 AND B33
AND B44;
DINGBL:=(B11 OR B22 OR B33 OR B44 OR B55) AND DIFF>0 AND REF(COUNT(MACD>0,2)=2,1) AND CROSS(DEA,DIFF);
DINGBL1:=(B11 OR B22 OR B33 OR B44 OR B55) AND DIFF>0 AND DEA<DIFF AND DIFF<REF(DIFF,1)
AND DIFF<REF(DIFF,2);
顶背离:IF(DINGBL,0,DEA),COLORGREEN;
IF(DIFF>0 AND CROSS(DEA,DIFF) AND DINGBL=0,0,DEA),COLORBLUE;
STICKLINE(DIBL1,DIFF,DEA,2,0),COLORRED;
STICKLINE(DINGBL1,DIFF,DEA,2,0),COLORGREEN;
MB:=EMA(DIFF,20);
UB:=MB+1.9104*STD(DIFF,20),COLORYELLOW,POINTDOT;
LB:=MB-1.9104*STD(DIFF,20),COLORLIBLUE,POINTDOT;
ZJS:=HHV(DEA,B0)/2;
ZJX:=LLV(DEA,A0)/2;
IF(DEA>DIFF AND DIFF>0 ,ZJS,DRAWNULL),COLORRED;
IF(DEA<DIFF AND DIFF<0 ,ZJX,DRAWNULL),COLORGREEN;

投股 票网 www.tou18 .cn

股市公式下载推荐
投股票网股市查询:资金行情查询 实时DDX查询 大智慧超赢 千股千评 最新提示 股票公告 投资要点 评级查询 股东查询 增发配股查询 股权结构查询
泰格医药 300347+4.51% 评股 实时DDX 大智慧 最新消息 题材分析 股权
格林达 603931+4.50% 评股 实时DDX 大智慧 最新消息 题材分析 股权
丽珠集团 000513+4.46% 评股 实时DDX 大智慧 最新消息 题材分析 股权
新集能源 601918+4.44% 评股 实时DDX 大智慧 最新消息 题材分析 股权
立昂微 605358+4.43% 评股 实时DDX 大智慧 最新消息 题材分析 股权
渝三峡A 000565+4.41% 评股 实时DDX 大智慧 最新消息 题材分析 股权
中能电气 300062+4.39% 评股 实时DDX 大智慧 最新消息 题材分析 股权
聚辰股份 688123+4.37% 评股 实时DDX 大智慧 最新消息 题材分析 股权
华铁应急 603300+4.37% 评股 实时DDX 大智慧 最新消息 题材分析 股权
佳云科技 300242+4.37% 评股 实时DDX 大智慧 最新消息 题材分析 股权
联系我们:nmsy8@hotmail.com 友情链接 要求相关的财经股票网站 今日股市行情在线查询
本站不推荐任何股票,站内广告不代表投股票网的观点,由此引起的一切法律责任均与本站无关,请网民自行判断真假,谨防网上股票预测诈骗!
本站所有内容仅供参考,不构成投资建议,据此操作,风险自担。本站不为所提供数据的错误或因依此信息所采取的任何行为负责。
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-120