最新更新 - 网站地图 -
您的当前位置:首页 > 股票指标 > MACD指标 > 通达信MACD交易主图指标公式

通达信MACD交易主图指标公式

来源:网络 点击: 时间:2023-01-10 02:57:13

SHORT:=12;LONG:=26;M:=12;
DIF:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
DEA:=EMA(DIF,M);
MACD:=2*(DIF-DEA);
KK:=IF(DIF>DEA,5,-5);
JCSC:=(M-1)/(M+1)*DEA/(1-2/(M+1));{计算出金叉死叉时的DIFF值}
DD:=(MACD/2+(DEA*(M-1)/(M+1)))/(1-2/(M+1));{计算出明日MACD=MACD时的DIFF值}
DIF拐头价:=(DIF*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1)))COLORGREEN,POINTDOT;
金死叉价:=(JCSC*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),NODRAW;
柱变向价:=(DD*(SHORT+1)*(LONG+1)-(LONG+1)*(SHORT-1)*EMA(C,SHORT)+(SHORT+1)*(LONG-1)*EMA(C,LONG))/(2*((LONG+1)-(SHORT+1))),COLORYELLOW,POINTDOT;
黄铢消失见顶:=IF(柱变向价>=DIF拐头价,柱变向价,DRAWNULL),COLORYELLOW,CIRCLEDOT,LINETHICK1;
上拐:IF(DIF拐头价<柱变向价,DIF拐头价,DRAWNULL),COLORRED,LINETHICK4;
下拐:IF(DIF拐头价>=柱变向价,DIF拐头价,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;
ZJ:=上拐,COLOR0000FF;
HY:=金死叉价,COLORFF00FF;
IF(ZJ>REF(ZJ,1),ZJ,DRAWNULL),COLORRED,LINETHICK2;
IF(HY>REF(HY,1),HY,DRAWNULL),COLORMAGENTA,LINETHICK2,NODRAW;
IF(HYSTICKLINE(C>ZJ AND C>O,H,C,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,L,O,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C>O,O,C,2.8,1),COLORRED;
STICKLINE(C>ZJ AND C<=O,H,L,0,0 ),COLORRED;
STICKLINE(C>ZJ AND C<=O,O,C,2.8,0),COLORRED;
STICKLINE(CLOSE=ZJ,H,L,3,0),COLORWHITE;
STICKLINE(CLOSESTICKLINE(CLOSESTICKLINE(CO,H,C,0,0),COLORCYAN;
STICKLINE(CO,O,L,0,0),COLORCYAN;
STICKLINE(CO,O,C,2.8,1),COLORCYAN;
STICKLINE(CSTICKLINE(CHD0:=CROSS(DIF,DEA);
金收:REF(L,BARSLAST(HD0)),COLORYELLOW,DOTLINE;
DRAWNUMBER(ISLASTBAR,金收,金收),COLORCYAN;
LD0:=CROSS(DEA,DIF);
死收:REF(H,BARSLAST(LD0)),COLOR00FF00,DOTLINE;
买入准备:DRAWICON(CROSS(柱变向价,DIF拐头价),上拐,34);
卖出准备:DRAWICON(CROSS(DIF拐头价,柱变向价),下拐,35);
SBL:=STRCAT(STRCAT(STRCAT(STRCAT(DYBLOCK,HYBLOCK),FGBLOCK),GNBLOCK),ZDBLOCK);
DRAWTEXT_FIX(ISLASTBAR,0.01,0.005,0,SBL),COLORCYAN;
总股本:=STRCAT(STRCAT('总股本: ',CON2STR(TOTALCAPITAL/1000000,2)),'亿');
流通盘:=STRCAT(STRCAT(' 流通盘: ',CON2STR(CAPITAL/1000000,2)),'亿');
全流通:=STRCAT(' 全流通: ',CON2STR((CAPITAL/1000000)/(TOTALCAPITAL/1000000),2));
市值:=STRCAT(STRCAT(' 流通市值: ',CON2STR((CAPITAL/1000000)*C,2)),'亿');
上市日期:=STRCAT(' 上市天数: ',CON2STR(FINANCE(42),0));
股本市值:=STRCAT('股本市值: ',STRCAT(STRCAT(STRCAT(STRCAT(总股本,流通盘),全流通),市值),上市日期));
DRAWTEXT_FIX(ISLASTBAR,0.01,0.045,0,股本市值),COLOR0090FF;

通达信MACD交易主图指标公式

    相关文章阅读

    Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top