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

通达信背离三合一指标公式

2021/3/9 19:06:44

DIFIF1:(EMA(CLOSE,12) - EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEAEA1:EMA(DIFIF1,9);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,0,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED;
弱:IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900;
DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B2,-0.6,'KDJ底离'),COLORYELLOW;{KDJ底背离};
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底背离};
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORBLUE;{MACD顶背离}
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORLIMAGENTA;{KDJ顶背离}
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.8,'RSI顶离'),COLORGREEN;{RSI顶背离};
DD:=C=HHV(C,180);
EE:=DEAEA1< REF(DEAEA1,1) AND REF(DEAEA1< REF(DEAEA1,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*DEAEA1,COLOR00FFFF;
顶背离:(DD AND EE AND DEAEA1< HHV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:= DEAEA1> REF(DEAEA1,1) AND REF(DEAEA1> REF(DEAEA1,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*DEAEA1,COLORMAGENTA;
底背离:(FF AND GG AND DEAEA1> LLV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORRED;
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD9:=(DIF-DEA)*2;
AK1:=DIF<0 AND DEA<0;
AK2:=AK1!=REF(AK1,1) AND AK1;
AK3:=COUNT(CROSS(DIF,DEA),BARSLAST(AK2))=1 AND CROSS(DIF,DEA) AND AK1;
AK4:=COUNT(CROSS(DIF,DEA),BARSLAST(AK2))=2 AND CROSS(DIF,DEA) AND AK1;
AK5:=REF(DIF,BARSLAST(AK3))<=REF(DIF,BARSLAST(AK4));
零下二金:AK4 AND AK5,LINETHICK2,COLOR38B0DE;
BC1:=DIF>0 AND DEA>0;
BC2:=BC1!=REF(BC1,1) AND B1;
BC3:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=1 AND CROSS(DIF,DEA) AND BC1;
BC4:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=2 AND CROSS(DIF,DEA) AND BC1;
BC5:=REF(DIF,BARSLAST(BC3))<=REF(DIF,BARSLAST(BC4));
零上二金:BC4 AND BC5,LINETHICK2;
T:=BARSLAST(CROSS(DIFIF1,DEAEA1) AND DIFIF1<0);
T1:=SUMBARS(T=0,2);
T2:=SUMBARS(T=0,3);
M:=BARSLAST(CROSS(0,MACD1));
M1:=SUMBARS(M=0,2);
M2:=SUMBARS(M=0,3);
DA1:=REF(DIFIF1,BARSLAST(DIFIF1=LLV(DIFIF1,M+1)));
DA2:=REF(DA1,T1-1);
DA3:=REF(DA2,T1-1);
LT:=BARSLAST(L=LLV(L,M+1));
MT:=BARSLAST(DIFIF1=LLV(DIFIF1,M+1));
L1:=REF(L,LT);
L2:=REF(L1,T1-1);
L3:=REF(L2,T1-1);
XG:=T=0 AND L1<L2 AND L2<L3 AND DA1>DA2 AND DA2>DA3;


看股吧公 式 ww w.kanguba.com

[源码翻译]通达信公式动态翻译显示
 DIFIF1:(EMA(CLOSE,12) - EMA(CLOSE,26))*100/EMA(CLOSE,26);
DEAEA1:EMA(DIFIF1,9);
MACD1:=2*(DIFIF1-DEAEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0,0),COLORRED;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0,0),COLORGREEN;
STICKLINE(MACD1<MACD2,0,MACD1,0,0),COLORCBCBC0;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
MACD:MACD1,NODRAW,COLORMAGENTA;
强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORRED;
弱:IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900;
DRAWICON(CROSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(B2,-0.6,'KDJ底离'),COLORYELLOW;{KDJ底背离};
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底背离};
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORBLUE;{MACD顶背离}
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORLIMAGENTA;{KDJ顶背离}
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.8,'RSI顶离'),COLORGREEN;{RSI顶背离};
DD:=C=HHV(C,180);
EE:=DEAEA1< REF(DEAEA1,1) AND REF(DEAEA1< REF(DEAEA1,1),1)=1;
CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
上升背离:(CC AND EE)*DEAEA1,COLOR00FFFF;
顶背离:(DD AND EE AND DEAEA1< HHV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORGREEN;
FF:=C=LLV(C,180);
GG:= DEAEA1> REF(DEAEA1,1) AND REF(DEAEA1> REF(DEAEA1,1),1)=1;
LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
下降背离:(LL AND GG)*DEAEA1,COLORMAGENTA;
底背离:(FF AND GG AND DEAEA1> LLV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORRED;
SHORT:=12;
LONG:=26;
MID:=9;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,MID);
MACD9:=(DIF-DEA)*2;
AK1:=DIF<0 AND DEA<0;
AK2:=AK1!=REF(AK1,1) AND AK1;
AK3:=COUNT(CROSS(DIF,DEA),BARSLAST(AK2))=1 AND CROSS(DIF,DEA) AND AK1;
AK4:=COUNT(CROSS(DIF,DEA),BARSLAST(AK2))=2 AND CROSS(DIF,DEA) AND AK1;
AK5:=REF(DIF,BARSLAST(AK3))<=REF(DIF,BARSLAST(AK4));
零下二金:AK4 AND AK5,LINETHICK2,COLOR38B0DE;
BC1:=DIF>0 AND DEA>0;
BC2:=BC1!=REF(BC1,1) AND B1;
BC3:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=1 AND CROSS(DIF,DEA) AND BC1;
BC4:=COUNT(CROSS(DIF,DEA),BARSLAST(BC2))=2 AND CROSS(DIF,DEA) AND BC1;
BC5:=REF(DIF,BARSLAST(BC3))<=REF(DIF,BARSLAST(BC4));
零上二金:BC4 AND BC5,LINETHICK2;
T:=BARSLAST(CROSS(DIFIF1,DEAEA1) AND DIFIF1<0);
T1:=SUMBARS(T=0,2);
T2:=SUMBARS(T=0,3);
M:=BARSLAST(CROSS(0,MACD1));
M1:=SUMBARS(M=0,2);
M2:=SUMBARS(M=0,3);
DA1:=REF(DIFIF1,BARSLAST(DIFIF1=LLV(DIFIF1,M+1)));
DA2:=REF(DA1,T1-1);
DA3:=REF(DA2,T1-1);
LT:=BARSLAST(L=LLV(L,M+1));
MT:=BARSLAST(DIFIF1=LLV(DIFIF1,M+1));
L1:=REF(L,LT);
L2:=REF(L1,T1-1);
L3:=REF(L2,T1-1);
XG:=T=0 AND L1<L2 AND L2<L3 AND DA1>DA2 AND DA2>DA3;
其它股票公式列表
看股吧查股导航:个股行情分析查询 股票DDX指标查询 走势点评 股票公告查询 大事提醒 股权质押查询 股票分红查询 解禁查询 高管持股 高管查询
九洲集团 300040+2.28% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
中国中铁 601390+2.28% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
华电重工 601226+2.28% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
安徽建工 600502+2.27% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
中信国安 000839+2.27% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
汇金科技 300561+2.26% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
华联股份 000882+2.26% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
*ST万方 000638+2.25% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
ST北文 000802+2.25% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
大全能源 688303+2.24% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
看股网力求但不保证数据的完全准确,不对因网站全部内容或部分内容而引致的盈亏承担任何责任,本站所有内容仅供参考。
本站不提供任何股票服务,站内广告不代表看股吧的观点,由此引起的一切法律责任均与本站无关,请股民自行识别判断,谨慎投资,预防上当受骗!
联系我们:nlfen9@hotmail.com
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-121