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

    正文概述    2022-05-15 00:00:00  

    difIF1:=(Ema(CLOSE,12) - ema(CLOSE,26))*100/EMA(CLOSE,26);
    DEAEA1:=EMA(DIFIF1,9);
    MacD1:=2*(DIFIF1-DEAEA1),STICK;
    macd2:=EMA(MACD1,3);
    STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3,0),COLORWHITE;
    STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3,0),COLORCYAN;
    STICKLINE(MACD1<MACD2,0,MACD1,3,0),COLORCBCBC0;
    STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORRED;
    DIFIF1,COLOR33FF33,LINETHICK2;
    DEAEA1,COLORBLUE,LINETHICK2;
    MACD:MACD1,NODRAW,COLORLIMAGENTA;
    强:IF(DIFIF1>=DEAEA1,DIFIF1,DRAWNULL),COLORWHITE,LINETHICK2;
    弱:=IF(DEAEA1>=DIFIF1,DEAEA1,DRAWNULL),COLORFF9900,LINETHICK2;
    DRAWICON(crOSS(DIFIF1,DEAEA1),DIFIF1+0.1,1);
    DRAWICON(CROSS(DEAEA1,DIFIF1),0.4,2);
    A1:=BArslAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
    B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
    DRAWTEXT(B1>0,-0.8,'MACD底背'),COLORFF00FF;
    A2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
    B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
    DRAWTEXT(B2,-0.6,'KDJ底离'),COLORBLUE;{KDJ底背离};
    A3:=BARSLAST(REF(CROSS("rsi.RSI1","RSI.RSI2"),1));
    B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
    DRAWTEXT(B3>0,-0.3,'RSI底离'),COLORGREEN;{RSI底背离};
    C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
    D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
    DRAWTEXT(D1>0,0.4,'MACD顶离'),COLORYELLOW;{MACD顶背离}
    C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
    D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
    DRAWTEXT(D2>0,0.6,'KDJ顶离'),COLORBLACK;{KDJ顶背离}
    C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
    D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
    DRAWTEXT(D3>0,0.8,'RSI顶离'),COLORCYAN;{RSI顶背离};
    DD:=C=HHV(C,180);
    EE:=DEAEA1< REF(DEAEA1,1) AND REF(DEAEA1< REF(DEAEA1,1),1)=1;
    CC:=C> REF(C,1) AND REF(C> REF(C,1),1)=1;
    上升背离:(CC AND EE)*DEAEA1,COLOR00FFFF;
    顶背离:(DD AND EE AND DEAEA1< HHV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORCYAN;
    FF:=C=LLV(C,180);
    GG:= DEAEA1> REF(DEAEA1,1) AND REF(DEAEA1> REF(DEAEA1,1),1)=1;
    LL:=C< REF(C,1) AND REF(C< REF(C,1),1)=1;
    下降背离:(LL AND GG)*DEAEA1,COLORLIMAGENTA;
    底背离:(FF AND GG AND DEAEA1> LLV(DEAEA1,180))*DEAEA1,STICK,LINETHICK3,COLORWHITE;



    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信MACD+KDJ+RSI未加密选股指标公式源码 加入收藏