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

    正文概述    2022-04-29 00:00:00  

    dif12:=(Ema(CLOSE,12)-ema(CLOSE,26))/((EMA(CLOSE,12)+EMA(CLOSE,26))/2)*1000;
    DEA12:=EMA(DIF12,9);
    {相对MacD:2*(DIF12-DEA12),STICK,COLORWHITE;}
    KDIF12:=3*(DIF12-DEA12);{KDIF12:=2*(DIF12-DEA12)};
    KDEA12:=SMA(KDIF12,5,2);
    买卖力道:2*(KDIF12-KDEA12),COLORLICYAN,LINETHICK1;
    {相对DIF:DIF12,COLORLIMAGENTA,LINETHICK2;
    相对DEA:DEA12,COLORCYAN,LINETHICK2;}
    微分DIF:KDIF12,COLORBLUE,LINETHICK2;
    微分DEA:KDEA12,COLORBLACK,LINETHICK1;
    微分macd:2*(KDIF12-KDEA12),STICK,,LINETHICK2,COLORYELLOW;
    B11:微分MACD>REF(微分MACD,1) AND 微分MACD>REF(微分MACD,2) AND
    REF(微分MACD,2)>REF(微分MACD,1) AND REF(微分MACD,2)/REF(微分MACD,1)>0,NODRAW;
    B12:=EXIST(B11,15)=1 AND 微分MACD<REF(微分MACD,1) AND REF(微分MACD,1)>REF(微分MACD,2);
    B121:B12 AND BArslAST(B11)>BARSLAST(B12) AND COUNT(B12,BARSLAST(B11))=1,NODRAW;
    {以下为MACD变色的代码}
    _红柱:IF(微分MACD>REF(微分MACD,1),微分MACD,DRAWNULL),STICK,COLORWHITE;
    IF(B11,微分MACD,DRAWNULL),STICK,COLORBLUE,LINETHICK7;
    IF(B121,微分MACD,DRAWNULL),STICK,COLORCYAN,LINETHICK7;
    绿柱:IF(微分MACD<REF(微分MACD,1),微分MACD,DRAWNULL),STICK,COLORBLUE;
    _抄底:=((crOSS(微分DIF,微分DEA)
    &&微分DEA<=-0.07)*微分DIF)*1.50,COLORMAGENTA;
    _DIF:=微分DIF,COLORRED;
    _DEA:=微分DEA,COLORBLUE;
    __强度:=IF(_DIF>_DEA,_DIF,DRAWNULL),COLORWHITE,LINETHICK2;
    _强度:=IF(_DEA<_DIF,_DEA,DRAWNULL),COLORLIMAGENTA,LINETHICK2;
    0;
    {统计买入后涨幅};
    ZF:=C/(REF(C,BARSLAST(B11)))*100-100,NODRAW;
    本轮涨幅1:=IF(B121=1,ZF,DRAWNULL);
    本轮涨幅:IF(C/(REF(C,BARSLAST(B11)))=0,1,本轮涨幅1);
    涨跌算术和1:SUM(本轮涨幅,0);
    {ZFF:=1*本轮涨幅/100;
    首轮涨后:1*(1+REF(ZFF,BARSSINCE(B121)) );
    N1轮涨:首轮涨后*REF(本轮涨幅,BARSSINCEN(B121,COUNT(B121,0)-1));
    总涨倍率1:=(本轮涨幅*REF(本轮涨幅,BARSLAST(B121)))/10000,NODRAW;
    总涨倍率:IF(B121=1,总涨倍率1,DRAWNULL);};



    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信微分MACD买卖力道副图未加密选股指标公式源码 加入收藏