最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 通达信RMACD副图指标

    正文概述    2024-04-13 21:22:21  

    源码

    {R射→→MACD   N:1,100,2}
    DRAWBAND(100,RGB(100,100,100),-20,RGB(100,100,100));
    VAR1:=(MA(CLOSE,80)-MA(CLOSE,13)/3);
    VAR2:=( MA((CLOSE-VAR1)/VAR1,1));
    VAR3:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100;
    VAR4:=SMA(VAR3,4,1);

    MMA:=EMA(VAR2,12)*0.7;
    MMB:=EMA(VAR2,3);
    快到底:IF(LLV(MMB-MMA,12)>0,0,-20),LINETHICK2,COLORGREEN;
    底初选股:IF( CROSS(0, LLV(MMB-MMA,12)),10,0),LINETHICK0;
    K:=CEILING(C/10);
    DIFF:=( EMA(CLOSE,12) - EMA(CLOSE,26))/K*100+50;
    DEA:=EMA(DIFF,9);
    MACD:= 2*(DIFF-DEA)+50;
    20,COLORGRAY,LINETHICK2;
    50,POINTDOT,COLORGRAY;
    80,COLORGRAY,LINETHICK2;
    DRAWBAND(DIFF,RGB(100,00,00),DEA,RGB(00,200,00));
    抄底:IF(快到底<0 AND CROSS(MACD,50) AND VAR4<18,80,0),COLORCYAN;
    DRAWICON( 抄底>0,35 ,1 );
    STICKLINE(MACD50,50,MACD,0,1),COLORGREEN;
    STICKLINE(MACD<50,50,MACD,0,1),COLORFFCC33;
    STICKLINE(MACD>REF(MACD,1)AND MACD<50,50,MACD,0,1),COLORYELLOW;
    STICKLINE(MACD>REF(MACD,1)AND MACD>50,50,MACD,0,1),COLORMAGENTA;

    LC:=REF(CLOSE,1);
    RSI:((SMA(MAX((CLOSE - LC),0),N,1) / SMA(ABS((CLOSE - LC)),N,1))
    * 100),COLORMAGENTA,LINETHICK2;
    RA1:=REF(RSI,N)=HHV(RSI,N*2+1);   RA2:=REF(RSI,N)=LLV(RSI,N*2+1); 
    RB1:=FILTER(RA1,N);               RB2:=FILTER(RA2,N);
    RC1:=BACKSET(RB1,N+1);            RC2:=BACKSET(RB2,N+1);
    RD1:=FILTER(RC1,N);    RD2:=FILTER(RC2,N);
    GD1:=BARSLAST(RD1);      DD1:=BARSLAST(RD2);
    GDTS:=IF(RD1,CURRBARSCOUNT,0);
    DDTS:=IF(RD2,CURRBARSCOUNT,0);
    GDT1:=IF(GD1,REF(GDTS,GD1),GDTS);
    DDT1:=IF(DD1,REF(DDTS,DD1),DDTS);
    GDCS1:=CONST(GDT1);      DDCS1:=CONST(DDT1);
    GINGBUTS1:=REF(GDT1,GD1+1);   DINGBUTS1:=REF(DDT1,DD1+1);
    GDCS2:=CONST(GINGBUTS1);   DDCS2:=CONST(DINGBUTS1);
    GDCS13:=CONST(REF(RSI,GDCS1-1));  DDCS13:=CONST(REF(RSI,DDCS1-1));
    GDCS23:=CONST(REF(RSI,GINGBUTS1-1));  DDCS23:=CONST(REF(RSI,DINGBUTS1-1));
    XG1:=BACKSET(ISLASTBAR,GDCS1);  XD1:=BACKSET(ISLASTBAR,DDCS1);
    XG2:=BACKSET(ISLASTBAR,GDCS2);  XD2:=BACKSET(ISLASTBAR,DDCS2);
    M:=2*N;
    RA11:=REF(RSI,M)=HHV(RSI,M*2+1);    RA22:=REF(RSI,M)=LLV(RSI,M*2+1); 
    RB11:=FILTER(RA11,M);               RB22:=FILTER(RA22,M);
    RC11:=BACKSET(RB11,M+1);            RC22:=BACKSET(RB22,M+1);
    RD11:=FILTER(RC11,M);    RD22:=FILTER(RC22,M),NODRAW;
    GD11:=BARSLAST(RD11);       DD11:=BARSLAST(RD22);
    GDTSS:=IF(RD11,CURRBARSCOUNT,0);
    DDTSS:=IF(RD22,CURRBARSCOUNT,0);
    GDT11:=IF(GD11,REF(GDTSS,GD11),GDTSS);
    DDT11:=IF(DD11,REF(DDTSS,DD11),DDTSS);
    GDCS11:=CONST(GDT11);      DDCS11:=CONST(DDT11);  
    GINGBUTS11:=REF(GDT11,GD11+1);   DINGBUTS11:=REF(DDT11,DD11+1);
    GDCS22:=CONST(GINGBUTS11);   DDCS22:=CONST(DINGBUTS11);
    高点压力1:DRAWLINE(CURRBARSCOUNT=GDCS2,RSI
    ,CURRBARSCOUNT=GDCS1,RSI,1) ,COLORRED,LINETHICK1;
    低点支撑1:DRAWLINE(CURRBARSCOUNT=DDCS2,RSI
    ,CURRBARSCOUNT=DDCS1,RSI,1),COLORRED,LINETHICK1;
    高点压力2:DRAWLINE(CURRBARSCOUNT=GDCS22,RSI
    ,CURRBARSCOUNT=GDCS11,RSI,1) ,COLORYELLOW,LINETHICK1;
    低点支撑2:DRAWLINE(CURRBARSCOUNT=DDCS22,RSI
    ,CURRBARSCOUNT=DDCS11,RSI,1),COLORYELLOW,LINETHICK1;
    高点压力3:DRAWLINE(CURRBARSCOUNT=GDCS22,RSI
    ,CURRBARSCOUNT=GDCS2,RSI,1) ,COLORGREEN,LINETHICK1;
    低点支撑3:DRAWLINE(CURRBARSCOUNT=DDCS22,RSI
    ,CURRBARSCOUNT=DDCS2,RSI,1),COLORGREEN,LINETHICK1;
    STICKLINE(XG1,GDCS13,GDCS13,0.5,1),COLORWHITE;
    STICKLINE(XG2,GDCS23,GDCS23,0.5,1),COLORYELLOW;
    STICKLINE(XD2,DDCS23,DDCS23,0.5,1),COLORMAGENTA;
    STICKLINE(XD1,DDCS13,DDCS13,0.5,1),COLORCYAN;
     

     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信RMACD副图指标 加入收藏