最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 同花顺MACD底背离买入指标公式

    正文概述    2024-04-14 18:00:06  

    SHORT:=12;
    LONG:=26;
    M:=9;
    DIFF : EMA(CLOSE,SHORT) - EMA(CLOSE,LONG),colorwhite;
    DEA : EMA(DIFF,M),coloryellow;
    macd :=2*(DIFF-DEA);
    Zero : 0;
    STICKLINE(MacD>0,0,MACD,1,0),colorred;
    STICKLINE(MACD<0,0,MACD,1,0),colorgreen;
    //VARGu:=(REF(diff,2)>=REF(diff,1) AND diff>REF(diff,1))OR (REF(diff,2)<=REF(diff,1) AND ( (REF(diff,1)-REF(diff,2)) /REF(diff,2) < (diff-REF(diff,1)) /REF(diff,1)*1.1 ) );
    //VARGu:=(REF(diff,2)>=REF(diff,1) AND diff>REF(diff,1));
    VARGu:=crOSS(diff,dea);
    AA:=COUNT(VARGu,BArslAST(DEA>=0));
    A1:=BARSLAST(REF(VARGu,1));
    二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND AA>=2 AND dea<0 AND A1>=5;
    DRAWTEXT(二次金叉,0.2,''+AA+'次金叉'),coloryellow;
    底背离:=MIN(REF(CLOSE,A1+1),REF(CLOSE,A1+2),REF(CLOSE,A1+3),REF(CLOSE,A1+4))>LLV(CLOSE,3) AND LLV(DIFF,3)> MIN(REF(DIFF,A1+1), REF(DIFF,A1+2),REF(DIFF,A1+3),REF(DIFF,A1+4)) AND VARGu AND diff<0;
    A3:=COUNT(底背离,BARSLAST(DEA>=0));
    STICKLINE(底背离,0,HHV(MACD,500),6,0),colorred;
    DRAWLINE(A1=0, MIN(REF(DIFF,A1+1), REF(DIFF,A1+2),REF(DIFF,A1+3),REF(DIFF,A1+4)),底背离,LLV(DIFF,3),0),colorred;
    //DRAWTEXT(底背离,0.12,' '+a3+'次背离'),COLORFF00FF;
    A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));
    顶背离:=REF(CLOSE,A2+1)DIFF AND CROSS(DEA,DIFF);
    DRAWLINE(A2=0,DEA,顶背离,DEA,0),colorgreen;
    建仓:IF(底背离,A3*HHV(MACD,500),0),colorred;


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 同花顺MACD底背离买入指标公式 加入收藏