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

    正文概述    2024-04-14 17:15:25  

    原来我是用大智慧编辑的CCI-J可是用通达信的同学很多.为了这部分的需要我试试用通达信编辑大家看看能不能用.有能力的可以和大智慧的比一比.有毛病提出来.咱们慢慢改就是了.因为我平时根本不用通达信软件.所以基本上我对于通达信是个门外汉.叫大家见笑了.谢谢你能进来看看.我现在附上两个图.你可以对比一下.
    {CCI-J}
    DRAWGBK(C>0,RGB(0,0,255),RGB(0,0,0),0,'0',0);
    TYB:=(HIGH + LOW + 2*CLOSE)/4;
    CCIA:=(TYB-MA(TYB,14))/(0.015*AVEDEV(TYB,14));
    CCIB:=(TYB-MA(TYB,28))/(0.015*AVEDEV(TYB,28));
    CCIC:=(TYB-MA(TYB,42))/(0.015*AVEDEV(TYB,42));
    CCI:WMA((CCIA+CCIB+CCIC)/3,3),COLOR00FF00,LINETHICK2;
    IF(CROSS(REF(CCI,1),CCI) AND CCI>100,60,100),COLOR0077FF;
    IF(CROSS(CCI,REF(CCI,1)) AND CCI<-150,-60,-100),COLOR00FFFF;
    XG: IF(CROSS(CCI,REF(CCI,1)) AND CCI<-150 AND "KDJ.J"(9,3,3)<10 ,-80,-100),COLOR0000FF;
    IF(CCI>REF(CCI,1),CCI,DRAWNULL),COLORRED,LINETHICK3;
    A1:=CCI>REF(CCI,1) AND REF(CCI,1) C1:=BACKSET(A1>0,2);
    D1:=(C1>0 AND REF(C1,1)<1);
    A2:=CCIREF(CCI,2);
    C2:=BACKSET(A2>0,2);
    D2:=(C2>0 AND REF(C2,1)<1);
    R1:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
    S1:=R1>REF(R1,1);
    T1:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
    U1:=T1>REF(T1,1);
    R2:=BACKSET(S1,REF(BARSLAST(D1),1)+2);
    S2:=R2>REF(R2,1);
    T2:=BACKSET(U1,REF(BARSLAST(D2),1)+2);
    U2:=T2>REF(T2,1);
    DRAWLINE(S2,CCI,S1,CCI,1),COLOR00FF00,LINETHICK4;
    DRAWLINE(U2,CCI,U1,CCI,1),POINTDOT,COLORBLUE,LINETHICK4;
    VAR12:=(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100;
    能量线:SMA(VAR12,3,1)*(-1)+100,COLORRED,LINETHICK0;
    KNX:=SMA(VAR12,3,1);
    MK:=MA(KNX,18);
    XG买:IF(KNX>45 AND CROSS(MK , KNX),-50,-100),COLOR00FF00;

    {顶底背离}
    {1.MACD}
    AA1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
    BB1:=REF(C,AA1+1)>C AND REF("MACD.DIF",AA1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
    DRAWTEXT(BB1>0,-2,'M底背'),COLOR00FFFF,LINETHICK1;{MACD底背离};
    CC1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
    DD1:=REF(C,CC1+1)"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
    DRAWTEXT(DD1>0,105,'M顶背'),COLOR00FF00,LINETHICK1;{MACD顶背离};
    {2.KDJ}
    AA2:=BARSLAST(REF(CROSS("KDJ.K","KDJ.D"),1));
    BB2:=REF(C,AA2+1)>C AND REF("KDJ.K",AA2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
    DRAWTEXT(BB2,5,'J9底背'),COLOR00FFFF,LINETHICK1;{KDJ底背离};
    CC2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
    DD2:=REF(C,CC2+1)"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
    DRAWTEXT(DD2>0,80,'J9顶背'),COLOR0077FF,LINETHICK1;{KDJ顶背离};
    {3.RSI}
    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,24,'R底背'),COLOR00FFFF,LINETHICK1;{RSI底背离}
    C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
    D3:=REF(C,C3+1)"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
    DRAWTEXT(D3>0,95,'R顶背'),COLOR0077FF,LINETHICK1;{RSI顶背离};

    {转向选股}
    转向:=TROUGHBARS(3,15,1)<10; {3--收盘.15--转向幅度.前【1个】的ZIG转向波谷值}
    IF(转向>REF(转向,1),0,-100),COLORFF00FF,LINETHICK1;
    DRAWTEXT( CCI>REF(CCI,1) AND CROSS(CCI,-100),-100,'CCI底背离'),COLOR00FF00;
     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信改编的CCI-J副图源码 加入收藏