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

通达信MACD序列指标公式

2021/4/4 19:11:54
本文公式指标的选股公式如下:

MACD序列之红箭头选股指标公式

SHORT:=12;
LONG:=26;
MID:=9;
DIF1:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA1:=EMA(DIF1,MID);
MACD1:=(DIF1-DEA1)*2;
MH:=MACD1;
HHM:=CONST(HHV(MACD1,240));
MM:=0.3*HHM;
DIF:DIF1,COLORGREEN,LINETHICK2;
DEA:DEA1,COLORWHITE,LINETHICK2;
DIF升:IF(DIF>=REF(DIF,1),DIF,DRAWNULL),COLORMAGENTA,LINETHICK2;
DEA升:IF(DEA>=REF(DEA,1),DEA,DRAWNULL),COLORLIRED,LINETHICK2;
MACD:MACD1,COLORSTICK,COLORYELLOW,LINETHICK2;
金叉:=CROSS(DIF,DEA);
轴上金叉:=金叉 AND DEA>0;
轴上周期:=BARSLAST(CROSS(0,DEA));
轴上金叉数:=COUNT(轴上金叉,轴上周期);
二次金叉:=轴上金叉 AND 轴上金叉数=2;
TDXSTEP288:DRAWICON(二次金叉,0.8*DEA,1);
TDXSTEP289:DRAWICON(二次金叉,0.7*DEA,1);
A1:=BARSLAST(REF(CROSS(DIF,DEA) AND DIF<0,1));
HC:=HHV(CLOSE,6);
B1:=REF(HC,A1+1)>HC AND REF(DIF,A1+1)<DIF AND CROSS(DIF,DEA) AND DIF<0 AND A1>=12;
K:=KDJ.K(9,3,3);
D:=KDJ.D(9,3,3);
R1:=RSI.RSI1(6,12,24);
R2:=RSI.RSI2(6,12,24);
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(CLOSE,A2+1)>CLOSE AND REF(K,A2+1)<K AND CROSS(K,D) AND A2>=9;
A3:=BARSLAST(REF(CROSS(R1,R2),1));
B3:=REF(CLOSE,A3+1)>CLOSE AND REF(R1,A3+1)<R1 AND CROSS(R1,R2) AND A3>=6;
C1:=BARSLAST(REF(CROSS(DEA,DIF) AND DIF>0,1));
LC:=LLV(CLOSE,6);
D1:=REF(LC,C1+1)<LC AND REF(DIF,C1+1)>DIF AND CROSS(DEA,DIF) AND DIF>0 AND C1>=12;
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(CLOSE,C2+1)<CLOSE AND REF(K,C2+1)>K AND CROSS(D,K) AND C2>=9;
C3:=BARSLAST(REF(CROSS(R2,R1),1));
D3:=REF(CLOSE,C3+1)<CLOSE AND REF(R1,C3+1)>R1 AND CROSS(R2,R1) AND C3>=6;
M底背:IF(B1>0,1,0),NODRAW,COLORRED;
K底背:IF(B2>0,1,0),NODRAW,COLORMAGENTA;
R底背:IF(B3>0,1,0),NODRAW,COLORYELLOW;
M顶背:IF(D1>0,1,0),NODRAW,COLORRED;
K顶背:IF(D2>0,1,0),NODRAW,COLORMAGENTA;
R顶背:IF(D3>0,1,0),NODRAW,COLORYELLOW;
TDXSTEP290:STICKLINE(M底背,-MM,0,3,0),COLORRED;
TDXSTEP291:STICKLINE(K底背,-MM,0,3,0),COLORMAGENTA;
TDXSTEP292:STICKLINE(R底背,-MM,0,3,0),COLORYELLOW;
TDXSTEP293:STICKLINE(M顶背,MM,0,3,0),COLORRED;
TDXSTEP294:STICKLINE(K顶背,MM,0,3,0),COLORMAGENTA;
TDXSTEP295:STICKLINE(R顶背,MM,0,3,0),COLORYELLOW;
TDXSTEP296:STICKLINE(MACD<REF(MACD,1) AND MACD>0,0,MACD,1,0),COLOR00CCFF,LINETHICK2;
TDXSTEP297:STICKLINE(MACD>=REF(MACD,1) AND MACD>0,0,MACD,1,0),COLORRED,LINETHICK2;
TDXSTEP298:STICKLINE(MACD>REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFF5599,LINETHICK2;
TDXSTEP299:STICKLINE(MACD<=REF(MACD,1) AND MACD<0,0,MACD,1,0),COLORFFFF55,LINETHICK2;
{DRAWTEXT(M底背,0.12,' M底背'),COLORRED;
DRAWTEXT(K底背,0.12,' K底背'),COLORMAGENTA;
DRAWTEXT(R底背,0.12,' R底背'),COLORYELLOW;
DRAWTEXT(M顶背,0.12,' M顶背'),COLORRED;
DRAWTEXT(K顶背,0.12,' K顶背'),COLORMAGENTA;
DRAWTEXT(R顶背,0.12,' R顶背'),COLORYELLOW;}
J:KDJ.J,NODRAW;
RSI:R1,NODRAW,COLORMAGENTA,LINETHICK2;
CCI:CCI,NODRAW;
TJ:=MACD>0;T:=MACD<0;
A:=LLV(MACD,50)=MACD;
DRAWICON(A AND FILTERX(A,20), MACD,1);
{MACD缩小再放大
TA:=MACD.MACD;
TB:=REF(TA,2)>MAX(0 ,REF(TA,1));
TC:=REF(TA,1)>-0.005 AND TA>MAX(0,REF(TA,1));
DRAWICON(TB AND TC,MACD,7);}
{时间序列}
DRAWTEXT(BARSLAST(TJ)=1,MACD,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=2,MACD,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=3,MACD,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=5,MACD,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=8,MACD,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=13,MACD,'13'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=21,MACD,'21'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=34,MACD,'34'),COLORGREEN;
DRAWTEXT(BARSLAST(TJ)=55,MACD,'55'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=1,MACD,'1'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=2,MACD,'2'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=3,MACD,'3'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=5,MACD,'5'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=8,MACD,'8'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=13,MACD,'13'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=21,MACD,'21'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=34,MACD,'34'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=55,MACD,'55'),COLORYELLOW;

投股票 网 w ww.tou18.cn

股市公式下载推荐
投股票网股市查询:资金行情查询 实时DDX查询 大智慧超赢 千股千评 最新提示 股票公告 投资要点 评级查询 股东查询 增发配股查询 股权结构查询
中亚股份 300512+2.75% 评股 实时DDX 大智慧 最新消息 题材分析 股权
金富科技 003018+2.75% 评股 实时DDX 大智慧 最新消息 题材分析 股权
南都电源 300068+2.75% 评股 实时DDX 大智慧 最新消息 题材分析 股权
宇新股份 002986+2.74% 评股 实时DDX 大智慧 最新消息 题材分析 股权
温州宏丰 300283+2.74% 评股 实时DDX 大智慧 最新消息 题材分析 股权
天孚通信 300394+2.72% 评股 实时DDX 大智慧 最新消息 题材分析 股权
硅宝科技 300019+2.72% 评股 实时DDX 大智慧 最新消息 题材分析 股权
正丹股份 300641+2.72% 评股 实时DDX 大智慧 最新消息 题材分析 股权
得邦照明 603303+2.71% 评股 实时DDX 大智慧 最新消息 题材分析 股权
岳阳林纸 600963+2.71% 评股 实时DDX 大智慧 最新消息 题材分析 股权
联系我们:nmsy8@hotmail.com 友情链接 要求相关的财经股票网站 今日股市行情在线查询
本站不推荐任何股票,站内广告不代表投股票网的观点,由此引起的一切法律责任均与本站无关,请网民自行判断真假,谨防网上股票预测诈骗!
本站所有内容仅供参考,不构成投资建议,据此操作,风险自担。本站不为所提供数据的错误或因依此信息所采取的任何行为负责。
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-120