最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 文华财经期货macd顶底背离多空提示指标

    正文概述    2024-05-04 13:49:05  

    DIFF:EMA(CLOSE,6) - EMA(CLOSE,13);  //macd参数6 13 5可自调

    DEA:EMA(DIFF,5);

    MACD:2*(DIFF-DEA),COLORSTICK;

    FILLRGN(DIFF DEA,DIFF,DEA,COLORRED);

    FILLRGN(DIFF DEA,DIFF,DEA,COLORGREEN);

    JC:=CROSS(DIFF,DEA);

    SC:=CROSSDOWN(DIFF,DEA);

    N1:=BARSLAST(JC)+1;

    N2:=BARSLAST(SC)+1;

    HH:=VALUEWHEN(CROSSDOWN(DIFF,DEA),HHV(H,N1));//上次MACD红柱期间合约最大值

    HH2:=VALUEWHEN(CROSSDOWN(DIFF,DEA),REF(HH,1));//上上次MACD红柱期间合约最大值

    MHD:=VALUEWHEN(CROSSDOWN(DIFF,DEA),HHV(MACD,N1));//上次MACD红柱期间MACD最大值

    MHD2:=VALUEWHEN(CROSSDOWN(DIFF,DEA),REF(MHD,1));//上上次MACD红柱期间MACD最大值

    LL:=VALUEWHEN(CROSS(DIFF,DEA),LLV(L,N2));//上次MACD绿柱期间合约最小值

    LL2:=VALUEWHEN(CROSS(DIFF,DEA),REF(LL,1));//上上次MACD绿柱期间合约最小值

    MLD:=VALUEWHEN(CROSS(DIFF,DEA),LLV(MACD,N2));//上次MACD绿柱期间MACD最小值

    MLD2:=VALUEWHEN(CROSS(DIFF,DEA),REF(MLD,1));//上上次MACD绿柱期间MACD最小值

    A:=CROSSDOWN(DIFF,DEA) HH HH2 MHD MHD2;//顶背离

    B:=CROSS(DIFF,DEA) LL LL2 MLD MLD2;//底背离

    DRAWTEXT(A,MACD, 顶背离

    DRAWTEXT(B,MACD, 底背离 ),VALIGN0;

    DRAWTEXT(CROSS(DIFF,DEA),MACD, 多 ),VALIGN0;

    DRAWTEXT(CROSSDOWN(DIFF,DEA),MACD, 空

    DRAWNUMBER( MOD(DAYBARPOS,13) 0 MACD 0,0,MOD(DAYBARPOS,13),0,COLORYELLOW),VALIGN0;

    DRAWNUMBER( MOD(DAYBARPOS,13)=0 MACD 0,0,13,0,COLORYELLOW),VALIGN0;

    DRAWNUMBER( MOD(DAYBARPOS,13) 0 MACD 0,0,MOD(DAYBARPOS,13),0,COLORYELLOW);

    DRAWNUMBER( MOD(DAYBARPOS,13)=0 MACD 0,0,13,0,COLORYELLOW);


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 文华财经期货macd顶底背离多空提示指标 加入收藏