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

通达信真正的MACD背离指标公式

2020/10/6 19:03:31

DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MACD:(DIF-DEA)*2,COLORSTICK;
{底部信号}
BB值:=EMA(100*(C-LLV(LOW,34))/(HHV(H,34)-LLV(LOW,34)),3);
AAA:=EMA(CLOSE,12)-EMA(CLOSE,26);
DRAWTEXT(CROSS(BB值,9),0, '‘底部'),COLORYELLOW;
DRAWICON(CROSS(BB值,9),0,41);
STICKLINE(CROSS(BB值,9),AAA,0,2,0),COLORYELLOW;
{DRAWICON(REF(DIF,1)>REF(DIF,2) AND DIF<REF(DIF,1) AND DIF>0 AND DIF>DEA,DIF*1.1,2),COLORGREEN;
DRAWICON(CROSS(DEA,DIF) AND DIF>0,DIF,37),COLORGREEN;
DRAWICON(REF(DIF,1)<REF(DIF,2) AND DIF>REF(DIF,1) AND DIF<0 AND DIF<DEA,DIF*1.1,1),COLORRED;
DRAWICON(CROSS(DIF,DEA) AND DIF<0,DIF,36),COLORRED;}
X_2:=BARSLAST(REF(MACD,1)<0 AND MACD>0);
X_3:=LLVBARS(MACD,X_2+20);
X_4:=IF(X_3>X_2,REF(MACD,X_3),0);
X_5:=MACD<0 AND MACD>X_4 AND LOW=LLV(LOW,X_2+20) AND X_4<0;
X_6:=REF(X_5,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,X_3)<0 AND MACD<0;
低背:DRAWLINE(X_4=X_3,MACD,X_6,MACD,0),COLORRED,LINETHICK2;
DRAWICON(X_6,MACD*1.2,26);
X_7:=HHVBARS(MACD,X_2+20);
X_8:=IF(X_7>X_2,REF(MACD,X_7),0);
X_9:=MACD>0 AND MACD<X_8 AND HIGH=HHV(HIGH,X_2+20) AND X_8>0;
X_10:=REF(X_9,1)=1 AND MACD>REF(MACD,1) AND REF(DIF,X_7)>0;
顶背:DRAWLINE(X_8=X_7,MACD,X_10,MACD,0),COLORGREEN,LINETHICK2;
DRAWICON(X_10,MACD*1.2,15);
X_11:=CLOSE/MA(CLOSE,40)*100<78;
X_12:=CLOSE/MA(CLOSE,60)*100<74;
X_13:=HIGH>LOW*1.051;
X_14:=X_13 AND COUNT(X_13,5)>1;
X_15:=IF(X_14 AND (X_11 OR X_12),2,0);
X_16:=CLOSE/REF(CLOSE,25)<=1.1;
X_17:=SMA(MAX(CLOSE-REF(CLOSE,2),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,2)),7,1)*100<15;
X_18:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;
X_19:=SMA(X_18,2,1);
X_20:=SMA(X_19,2,1);
X_21:=IF(X_19>REF(X_19,1) AND REF(X_19,1)<REF(X_19,2) AND X_19<23,1.5,0);
抄底:X_16 AND X_15 AND X_17 AND X_21 ,COLORWHITE;
{X_22:=100-100*(HHV(HIGH,5*8)-CLOSE)/(HHV(HIGH,5*8)-LLV(LOW,5*8));
X_23:=MA(CLOSE,5);
X_24:=IF(CLOSE>SAR(10,2,20),1,0);
X_25:=IF(CLOSE<SAR(10,2,20),(-1),0);
X_26:=ATAN((X_23/REF(X_23,1)-1)*100)*180/3.1416;
X_27:=IF(X_26>30,1,0);
X_28:=IF(X_26<(-30),(-1),0);
X_29:=X_24+X_27+X_25+X_28;}
{线变色}
{IF(X_29<(-1) OR X_22<25.01,DIF,DRAWNULL),COLORGREEN,LINETHICK1;
IF(X_22>74.989998 OR X_29>0,DIF,DRAWNULL),COLORRED,LINETHICK1;}
VA1:=HHVBARS(MACD,BARSLAST(MACD<0)+1);
VA2:=CROSS(BACKSET(CROSS(0,MACD) OR (ISLASTBAR AND MACD>0),REF(VA1,1)+2),0.5);
前高:DRAWLINE(VA2,MACD,REF(VA2,1),REF(MACD,1),1),COLORYELLOW,POINTDOT ;
VA3:=LLVBARS(MACD,BARSLAST(MACD>0)+1);
VA4:=CROSS(BACKSET(CROSS(MACD,0) OR (ISLASTBAR AND MACD<0),REF(VA3,1)+2),0.5);
前低:DRAWLINE(VA4,MACD,REF(VA4,1),REF(MACD,1),1),COLORYELLOW,POINTDOT ;
启动点:=MACD<0 AND MACD>REF(MACD ,1) AND REF(MACD ,1)<REF(MACD ,2)AND REF(MACD ,2)<REF(MACD ,3)AND REF(MACD ,3)<REF(MACD ,4);
STICKLINE(启动点,0.2,MACD,0.3,0),COLORYELLOW COLORYELLOW;
{STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.8,0),COLOR000055;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,1.1,0),COLOR000099;
STICKLINE(MACD>REF(MACD,1) AND MACD>0,0,MACD,0.6,0),COLOR0000BB;}
启动点A:0,COLORYELLOW;
{DRAWICON(启动点,2,11);}
{MACD&KDJ 金叉共振}
{DIF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIF,9);}
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);
DRAWICON(A,DEA*1.2,25);
DRAWTEXT(A,DEA*1.2, ' 金叉共振'),COLORYELLOW;
0,COLORGRAY,DOTLINE;
{RSI买入}
WRSI:=SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100;
相对强弱RSI买入:=CROSS(WRSI,20),STICK,LINETHICK2,COLORYELLOW;
{RSI买入:STICKLINE(CROSS(WRSI,20),0,70,0,0),LINETHICK2,COLORYELLOW;}
STICKLINE(相对强弱RSI买入,0-0.1,MACD-0.1,0.3,0),COLORRED;
DRAWTEXT(相对强弱RSI买入,MACD-0.1, '‘入'),COLORYELLOW;
{背离}
A3:=BARSLAST(REF(CROSS("RSI.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(B3>0,-0.3,'RSI底离'),COLORCYAN;{RSI底背离};
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(D3>0,0.5,'RSI顶离'),COLORGREEN;{RSI顶背离};

投股 票网 www.tou18 .cn

股市公式下载推荐
投股票网股市查询:资金行情查询 实时DDX查询 大智慧超赢 千股千评 最新提示 股票公告 投资要点 评级查询 股东查询 增发配股查询 股权结构查询
长青集团 002616+4.21% 评股 实时DDX 大智慧 最新消息 题材分析 股权
宁德时代 300750+4.20% 评股 实时DDX 大智慧 最新消息 题材分析 股权
凤凰光学 600071+4.20% 评股 实时DDX 大智慧 最新消息 题材分析 股权
*ST蓝丰 002513+4.20% 评股 实时DDX 大智慧 最新消息 题材分析 股权
晨曦航空 300581+4.19% 评股 实时DDX 大智慧 最新消息 题材分析 股权
芯碁微装 688630+4.17% 评股 实时DDX 大智慧 最新消息 题材分析 股权
万孚生物 300482+4.17% 评股 实时DDX 大智慧 最新消息 题材分析 股权
光峰科技 688007+4.17% 评股 实时DDX 大智慧 最新消息 题材分析 股权
*ST康美 600518+4.15% 评股 实时DDX 大智慧 最新消息 题材分析 股权
科瑞技术 002957+4.14% 评股 实时DDX 大智慧 最新消息 题材分析 股权
联系我们:nmsy8@hotmail.com 友情链接 要求相关的财经股票网站 今日股市行情在线查询
本站不推荐任何股票,站内广告不代表投股票网的观点,由此引起的一切法律责任均与本站无关,请网民自行判断真假,谨防网上股票预测诈骗!
本站所有内容仅供参考,不构成投资建议,据此操作,风险自担。本站不为所提供数据的错误或因依此信息所采取的任何行为负责。
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-120