看股吧 www.kanguba.com [今日大盘指数 欧美全球股市行情 股票公式查询网站] 手机APP下载 | 手机访问 | 加入收藏 | 保存到桌面
看股吧
看股吧股票网-今日大盘指数 欧美全球股市行情 股票公式查询网站
股票查询: 行情分析 DDX指标 走势点评 股票公告 大事 主力持仓 股权质押 分红 大小非 十大股东 股本结构 高管持股 研报 高管 主营 龙虎榜 股吧
当前位置: 看股吧 > 股票公式 > 通达信公式
股票公式搜索:

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

2020/10/6 18:32:15

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.kangu ba.com

其它股票公式列表
看股吧查股导航:个股行情分析查询 股票DDX指标查询 走势点评 股票公告查询 大事提醒 股权质押查询 股票分红查询 解禁查询 高管持股 高管查询
海优新材 688680+4.95% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
金杯电工 002533+4.95% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
*ST赫美 002356+4.95% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
*ST群兴 002575+4.95% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
立中集团 300428+4.94% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
美好置业 000667+4.94% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
欧陆通 300870+4.93% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
三达膜 688101+4.93% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
ST华仪 600290+4.93% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
*ST众应 002464+4.91% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
看股网力求但不保证数据的完全准确,不对因网站全部内容或部分内容而引致的盈亏承担任何责任,本站所有内容仅供参考。
本站不提供任何股票服务,站内广告不代表看股吧的观点,由此引起的一切法律责任均与本站无关,请股民自行识别判断,谨慎投资,预防上当受骗!
联系我们:nlfen9@hotmail.com
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-121