• 网站首页
  • 股票知识
  • 股票公式
  • 散户炒股
  • 问答百科
  • 缠中说禅
  • 概念股
  • 【炒股入门】MACD叠加共振(通达信公式源码)

    发布时间: 2022-05-01 15:45 首页:股票一点通>股票公式>通达信公式> 阅读()
    MACD叠加共振

    {斐波均线+MACD 主图}
    MA8:=MA(CLOSE,8);
    MA13:MA(CLOSE,13);
    MA21:=MA(CLOSE,21),COLOR1880FF;
    MA34:MA(CLOSE,34),COLORGREEN;
    MA55:MA(CLOSE,55),COLORMAGENTA;
    F:=100*(C-REF(C,1))/REF(C,1);
    今小昨:=IF(CP1:=今小昨;
    今小前:=IF(CP2:=今小前;
    STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,3,0),COLORFF1CAE;
    STICKLINE(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,OPEN,CLOSE,3,0),COLORFF972F;
    DRAWTEXT(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,L*0.998,'←底'),COLOR105D10;
    DRAWTEXT(CROSS(C,MA55),L*0.995,'←满仓'),COLORYELLOW;
    DRAWTEXT_FIX(1,0,0.1,0,'★ 粉色55线走平上翘、线上做多、回调阴线买 ★'),COLORFF00FF;
    DRAWTEXT_FIX(1,0,0.2,0,'★ 三均线走平上翘、每次回调均线、可阴线买 ★'),COLORYELLOW;
    DRAWTEXT_FIX(1,0.23,0.1,0,'★ 三线开花、金叉全仓、量线、MACD共振才可买 ★'),COLORYELLOW;
    DRAWTEXT_FIX(1,0.23,0.2,0,'★ 抄底、满仓、买1买2、量线、MACD共振才可买 ★'),COLORFF00FF;
    MTM:=C-REF(C,1);DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
    买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
    DRAWTEXT(FILTER(买=1,5),LOW-0.03,'←预警'),COLORFF00FF;
    多方炮:=REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)OPEN;
    DRAWTEXT(多方炮,L+0.1,'←多方炮'),COLORGRAY;
    DE:=CONST(LLV(L,90));
    JI:=CONST(HHV(H,90))-DE;
    DE_K:=DE+JI/3*2;
    JI_K:=JI/2;
    RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
    DE_A:=CONST(LLV(RSV,90));
    DD_A:=CONST(HHV(RSV,90))-DE_A;
    R:=(RSV-DE_A)/DD_A;
    RSV1:=R*JI_K+DE_K;
    DE_M:=DE+JI/3;
    JI_M:=JI/2;
    KDL:=CONST(LLV(EMA(C,26),90));
    KDH:=CONST(HHV(EMA(C,26),90))-KDL;
    R_K1:=(EMA(C,12)-KDL)/KDH;
    R_K2:=(EMA(C,26)-KDL)/KDH;
    DIF:(R_K1-R_K2)*JI*1.5+DE_M,COLORGRAY;
    DEA:EMA(DIF,9),COLOR104C13;
    MACD:=(DIF-DEA)*2+DE_M;
    STICKLINE(MACD>=DE_M,MACD,DE_M,0,0),COLORRED;
    D_1:=MACD>H AND H>=DE_M AND DE_M>=L;
    D_2:=MACD>H AND H>=L AND L>DE_M;
    D_3:=H>MACD AND MACD>=L AND L>DE_M;
    D_4:=H>MACD AND MACD>DE_M AND DE_M>=L;
    STICKLINE(D_1>0,H,DE_M,0,0),COLORYELLOW;
    STICKLINE(D_2,H,L,0,0),COLORYELLOW;
    STICKLINE(D_3,MACD,L,0,0),COLORYELLOW;
    STICKLINE(D_4,MACD,DE_M,0,0),COLORYELLOW;
    D_5:=MACDD_6:=MACDD_7:=LD_8:=LSTICKLINE(MACDSTICKLINE(D_5,DE_M,L,0,0),COLORYELLOW;
    STICKLINE(D_6,H,L,0,0),COLORYELLOW;
    STICKLINE(D_7,H,MACD,0,0),COLORYELLOW;
    STICKLINE(D_8,DE_M,MACD,0,0),COLORYELLOW;
    VAR1:=LLV(LOW,21);
    VAR2:=HHV(HIGH,21);
    AK1:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*100),5);
    AK:=EMA((((CLOSE-VAR1)/(VAR2-VAR1))*50),13);
    DD2:=EMA(((0.667*REF(AK1,1))+(0.333*AK1)),2);
    VAR3:=LLV(LOW,55);
    VAR4:=HHV(HIGH,34);
    VAR5:=EMA((((CLOSE-VAR3)/(VAR4-VAR3))*100),3);
    VAR6:=((AK+VAR5)/2);
    VAR7:=EMA(((0.667*REF(VAR5,1))+(0.333*AK1)),2);
    VAR8:=EMA(VAR6,5);
    BB:=EMA(((0.667*REF(VAR8,1))+(0.333*VAR8)),2);
    AB:=CROSS(AK1,AK);
    BB1:=(CROSS(AK1,BB) AND (BB<30));
    CD:=(BB1*0.6);{股民学院 整理}
    DRAWTEXT((CD=0.6),L,'←抄底'),COLOR33CC99;
    乖离线:=((C-REF(MA21,1))/20+MA21)*1.20;
    TT1:=CROSS(MA21,MA34) AND CROSS(MA21,MA55) AND V>REF(V,1);
    TT2:=MA21>REF(MA21,2) AND V>REF(V,1) AND CROSS(C,MA21);
    STICKLINE(TT1,L,L-0.09,4,0),COLORYELLOW;
    DRAWTEXT(TT1,L*0.995,'←金叉全仓'),COLORYELLOW;
    STICKLINE(CROSS(C,MA34) AND CROSS(C,MA55)
    AND CROSS(C,MA21),L,L-0.18,4,0),COLORYELLOW;
    DRAWTEXT(CROSS(C,MA34) AND CROSS(C,MA55)
    AND CROSS(C,MA21),L*0.97,'←三线开花'),COLORRED;
    STICKLINE(TT2,L,L-0.09,4,0),COLORYELLOW;
    DRAWTEXT(TT2,L*0.995,'←买1'),COLORYELLOW;
    STICKLINE(CROSS(C,乖离线),H,H+0.09,4,0),COLOR00FF00;
    DRAWTEXT(CROSS(C,乖离线) ,H+0.13,'←卖点'),COLOR00FF00;
    STICKLINE(MA55>=REF(MA55,1) AND MA21>=REF(MA21,1)
    AND CROSS(C,MA55),L,L-0.09,4,0),COLORFF972F;
    DRAWTEXT(MA55>=REF(MA55,1) AND MA21>=REF(MA21,1)
    AND CROSS(C,MA55),L*0.98,'←满仓'),COLORFF972F;
    STICKLINE(MA34>=REF(MA34,1) AND CROSS(C,MA21) AND CROSS(C,MA34)
    AND V>REF(V,1),L,L-0.09,4,0),COLORFF00FF;
    DRAWTEXT(MA34>=REF(MA34,1) AND CROSS(C,MA21) AND CROSS(C,MA34)
    AND V>REF(V,1),L*0.976,'←买2'),COLORFF00FF;


    DRAWTEXT_FIX(ISLASTBAR,0.8,0.1,1,STRCAT(STRCAT(HYBLOCK,' '), STRCAT(STRCAT(DYBLOCK,' '),GNBLOCK))),COLORGREEN;


    特别声明:文章内容仅供参考,不造成任何投资建议。投资者据此操作,风险自担。

    网站首页-股票知识--股票公式-散户炒股-问答百科--缠中说禅-概念股

    未经本站书面特别授权,请勿转载或建立镜像

    Copyright @ 2020 All Rights Reserved.版权所有 XMl地图
    Baidu
    map