最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信日周MACD副图贴图未加密选股指标公式源码

    正文概述    2022-07-28 00:00:00  


    周放大数:=0.8;

    日缩小数:=1;

    dif:=ema(CLOSE,12)-EMA(CLOSE,26);

    DEA:=EMA(DIF,9);

    macd:=(DIF-DEA)*2;

    QJZXZ:=CONST(MIN(CONST(LLV(DIF,下移周期)),CONST(LLV(MACD,下移周期))));

    DRAWGBK(C>1,RGB(0,0,0),RGB(1,1,1),1,0,0);

    {====================MACD过前高=======================}

    QGZSJ1:=BArslAST(crOSS(0,MACD));

    QGZSJ2:=IF(MACD<0 AND ISLASTBAR,SUMBARS(CROSS(MACD,0),1),SUMBARS(CROSS(MACD,0),2));

    ZDZ:=CONST(FINDHIGH(MACD,QGZSJ1,QGZSJ2-QGZSJ1,1));

    ZDZSJ:=CONST(FINDHIGHBARS(MACD,QGZSJ1,QGZSJ2-QGZSJ1,1));

    HX:=DRAWLINE(ZDZ=MACD,MACD,REF(ZDZ=MACD,1),REF(MACD,1),1);

    NOTEXTQ22:IF(CURRBARSCOUNT<=ZDZSJ+1,HX,DRAWNULL),COLORBLUE,DOTLINE;

    NOTEXTQ23:IF(CURRBARSCOUNT<=ZDZSJ+1,NOTEXTQ22*1.38,DRAWNULL),COLORLIGRAY,POINTDOT;

    DRAWTEXT(ISLASTBAR,NOTEXTQ22,STRCAT(' ',CON2STR(NOTEXTQ22,2))),COLORBLUE;

    DRAWTEXT(CURRBARSCOUNT=ZDZSJ+1,MACD,'前横线'),COLORBLUE,DRAWAbovE;

    {=====================================================}

    SCSJ:=CONST(BARSLAST(DIF<REF(DIF,1) AND REF(DIF,1)>REF(DIF,2)))+1;

    NOTEXTSCHX:IF(CURRBARSCOUNT<=SCSJ+1,CONST(REF(DIF,SCSJ)),DRAWNULL),COLORCYAN,DOTLINE;

    DRAWICON(CROSS(DIF,NOTEXTSCHX),NOTEXTSCHX,1);

    {=============================}

    日DIF:DIF,COLORRED,NODRAW;

    日DEA:DEA,COLORLIMAGENTA,NODRAW;

    日MACD:MACD,COLORWHITE,NODRAW;

    STICKLINE(日MACD>0,日MACD*日缩小数,0,0,0),COLORWHITE;

    STICKLINE(日MACD<0,日MACD*日缩小数,0,0,0),COLORGREEN;

    NOTEXTDIF:日DIF*日缩小数,COLORRED;

    NOTEXTDEA:日DEA*日缩小数,COLORLIMAGENTA;

    {=============================}

    下移线1:=0.1;

    周DIF:EMA(CLOSE,12*5)-EMA(CLOSE,26*5),COLORRED,NODRAW;

    周DEA:EMA(周DIF,9*5),COLORLIMAGENTA,NODRAW;

    周MACD:(周DIF-周DEA)*2,COLORWHITE,NODRAW;

    MACD转换1:=周MACD*周放大数+下移线1;

    T22:=周DIF*周放大数+下移线1;

    QJZDZ:=CONST(MAX(CONST(HHV(T22,下移周期)),CONST(HHV(MACD转换1,下移周期))));

    {=============================}

    下移线2:=-(Abs(QJZXZ)+ABS(QJZDZ));

    {=============================}

    MACD转换2:=周MACD*周放大数+下移线2;

    STICKLINE(周MACD>0,MACD转换2,下移线2,0,1),COLORWHITE;

    STICKLINE(周MACD<0,MACD转换2,下移线2,0,1),COLORGREEN;

    NOTEXT22:周DIF*周放大数+下移线2,COLORLIMAGENTA;

    NOTEXT33:周DEA*周放大数+下移线2,COLORRED;

    DRAWTEXT_FIX(1,0,0,0,'███████'),COLORBLUE;

    DRAWTEXT_FIX(1,0,0,0,' 日线MACD'),COLORWHITE;

    DRAWTEXT_FIX(1,0,0.53,0,'███████'),COLORBLUE;

    DRAWTEXT_FIX(1,0,0.53,0,' 周线MACD'),COLORWHITE;

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信日周MACD副图贴图未加密选股指标公式源码 加入收藏