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

通达信复合MACD指标公式

2021/1/20 18:11:28

DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
MYY:=EMA(CLOSE,3)-EMA(CLOSE,3);
YMM:=EMA(MYY,3);
MACD:(DIF-DEA)*2,COLORSTICK;
DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA1:=EMA(DIFF1,9);
DRAWBAND(DEA1,DRAWNULL,DIFF1,RGB(221,160,221));
{DIF上升为红色,下降为绿色}
IF(DIF>REF(DIF,1),DIF,DRAWNULL),COLORRED,LINETHICK2;
IF(DIF<REF(DIF,1),DIF,DRAWNULL),COLORGREEN,LINETHICK2;
{加了DEA的上升棕色,下降黄色}
IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORBROWN,LINETHICK2;
IF(DEA<REF(DEA,1),DEA,DRAWNULL),COLORYELLOW,LINETHICK2;
MACD2:=MACD;
获利比:WINNER(C),NODRAW;
涨家数:INDEXADV,NODRAW,COLORRED;
跌家数:INDEXDEC,NODRAW,COLORGREEN;
正量能:涨家数/(涨家数+跌家数)*100,NODRAW,COLORMAGENTA;
负量能:跌家数/(涨家数+跌家数)*100,NODRAW,COLORYELLOW;
高开:=O>REF(H,1);
隔空高开:高开,NODRAW;
低开:=O<REF(L,1);
隔空低开:低开,NODRAW;
{以下是顶底背离画图}
TR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD:=HIGH-REF(HIGH,1);
LD:=REF(LOW,1)-LOW;
PDM:=SUM(IF(HD>0 AND HD>LD,HD,0),14);
MDM:=SUM(IF(LD>0 AND LD>HD,LD,0),14);
PDI:=PDM*100/TR;
MDI:=MDM*100/TR;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIF,A1+1)<DIF AND CROSS(DIF,DEA);
A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) AND CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));
A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
D1:=REF(C,C1+1)<C AND REF(DIF,C1+1)>DIF AND CROSS(DEA,DIF);
C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) AND CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));
C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));
C4:=BARSLAST(REF(CROSS(MDI,PDI),1));
D4:=REF(C,C+1)<C AND REF(MDI,C4+1)>MDI AND CROSS(MDI,PDI);
A4:=BARSLAST(REF(CROSS(PDI,MDI),1));
B4:=REF(C,A4+1)>C AND REF(PDI,A4+1)<PDI AND CROSS(PDI,MDI);
MACD顶背:IF(D1>0,1,0),COLOR00FF00,NODRAW;
MACD底背:IF(B1>0,1,0),COLORRED,NODRAW;
KDJ底背:IF(B2>0,1,0),COLORFF00FF,NODRAW;
KDJ顶背:IF(D2>0,1,0),COLORFFCC66,NODRAW;
RSI底背:IF(B3>0,1,0),COLORYELLOW,NODRAW;
DMI底背:IF(B4>0,1,0),COLORBROWN,NODRAW;
RSI顶背:IF(D3>0,1,0),COLORWHITE,NODRAW;
DMI顶背:IF(D4>0,1,0),COLORLIRED,NODRAW;
DRAWLINE(A1=0,DEA,MACD底背,DEA,0),COLORRED,LINETHICK2;
DRAWLINE(A2=0,DEA,MACD顶背,DEA,0),COLOR00FF00,LINETHICK2;
STICKLINE(B1>0,-0.1,0,2,0),COLORRED;
STICKLINE(B2>0,-0.1,-0.2,2,0),COLORFF00FF;
STICKLINE(B3>0,-0.1,0,2,0),COLORYELLOW;
STICKLINE(B4>0,-0.1,-0.2,2,0),COLORBROWN;
STICKLINE(D1>0,0.1,0,2,0),COLOR00FF00;
STICKLINE(D2>0,0.1,0.2,2,0),COLORFFCC66;
STICKLINE(D3>0,0.1,0,2,0),COLORWHITE;
STICKLINE(D4>0,0.1,0.2,2,0),COLORLIRED;
STICKLINE((MACD2>=0),0,MACD2,0,1),COLORRED;
STICKLINE(((MACD2>=0) AND (MACD2 < REF(MACD2,1))),0,MACD2,0,0),COLORMAGENTA;
STICKLINE((MACD2<0),0,MACD2,0,0),COLORGREEN;
STICKLINE(((MACD2<0) AND (MACD2 > REF(MACD2,1))),0,MACD2,0,1),COLORWHITE;
DRAWICON(LONGCROSS(CLOSE,MA(CLOSE,5),17),MACD2,1);
DRAWICON(LONGCROSS(MA(CLOSE,5),CLOSE,17),MACD2,2);
DRAWICON(CROSS(DIF,DEA) AND DIF<=0.2,LLV(DIF,1),29);
DRAWICON(CROSS(DIF>=0,DIF<DEA),DIF,1);
低位反转:=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,MACD,0.3,0),COLORRED;
高位反转:=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,MACD,0.3,0),COLORGREEN;
低位金叉:=CROSS(DIF,DEA) AND DIF<-0.1;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
DRAWICON(二次金叉,0,25);
三次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=3,60)=1;
DRAWICON(三次金叉,0,26);
TJ:=MACD2>0;
T:=MACD2<0;
DRAWTEXT(BARSLAST(TJ)=1,MACD2,'1'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=2,MACD2,'2'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=3,MACD2,'3'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=5,MACD2,'5'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=8,MACD2,'8'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=13,MACD2,'13'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=21,MACD2,'21'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=34,MACD2,'34'),COLORYELLOW;
DRAWTEXT(BARSLAST(TJ)=55,MACD2,'55'),COLORYELLOW;
DRAWTEXT(BARSLAST(T)=1,MACD2,'1'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=2,MACD2,'2'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=3,MACD2,'3'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=5,MACD2,'5'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=8,MACD2,'8'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=13,MACD2,'13'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=21,MACD2,'21'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=34,MACD2,'34'),COLORGREEN;
DRAWTEXT(BARSLAST(T)=55,MACD2,'55'),COLORGREEN;

看股吧公 式 www .kanguba.com

其它股票公式列表
看股吧查股导航:个股行情分析查询 股票DDX指标查询 走势点评 股票公告查询 大事提醒 股权质押查询 股票分红查询 解禁查询 高管持股 高管查询
海亮股份 002203+2.18% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
洛阳钼业 603993+2.17% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
四川长虹 600839+2.17% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
爱康科技 002610+2.17% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
红塔证券 601236+2.16% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
光大证券 601788+2.15% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
洲际油气 600759+2.15% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
豫光金铅 600531+2.14% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
兰石重装 603169+2.13% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
柳化股份 600423+2.13% 公告 DDX在线 走势点评 限售解禁 高管 股权质押
看股网力求但不保证数据的完全准确,不对因网站全部内容或部分内容而引致的盈亏承担任何责任,本站所有内容仅供参考。
本站不提供任何股票服务,站内广告不代表看股吧的观点,由此引起的一切法律责任均与本站无关,请股民自行识别判断,谨慎投资,预防上当受骗!
联系我们:nlfen9@hotmail.com
手机版(手机访问当前页面) | 手机APP下载 | 电脑端(适合电脑或大屏用户) | 备案号:沪ICP备2024045114号-121