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

    正文概述    2024-05-04 04:20:55  


    通达信公式源码概况:


    指标类别:通达信公式


    授权方式: 免费版


    指标评级: ★★★★★


    指标分类: 策略


    画线方法: 副图

    公式解读:

    公式源码如下:


     

    Var1:=COST(99999)*0;  

    Var2:=COST(10)*0;  

    Var3:=99999;  

    短期:MA(CLOSE,5)-2*STD(CLOSE,14);  

    中期:MA(CLOSE,34)-2*STD(CLOSE,60);  

    长期:MA(CLOSE,89)-2*STD(CLOSE,155);  

    MA5:MA(CLOSE,5);  

    MA10:MA(CLOSE,10);  

    MA20:MA(CLOSE,20);  

    MA60:MA(CLOSE,60);  

    CS:=(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8))*100;  

    YJD:=(EMA(CS,3)-50)*2;  

    STICKLINE(CROSS(YJD,-80),LOW*0.94,LOW*0.96,2,1),COLORYELLOW;  

    DRAWTEXT(CROSS(YJD,-80),LOW*0.95,'波段'),COLORYELLOW;  

    N:=9;  

    M1:=3;  

    M2:=3;  

    RSV=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;  

    a=SMA(RSV,M1,1);  

    b=Sma(a,M2,1);  

    e=3*a-2*b;  

    IF(a 0)a=0;  

    IF(a 100)a=100;  

    IF(b 0)b=0;  

    IF(b 100)b=100;  

    IF(e 0)e=0;  

    IF(e 100)e=100;  

    K:a;  

    D:b;  

    J:e;  

    N:=14;  

    TYP:=(IF(ISNULL(HIGH),CLOSE,HIGH)+IF(ISNULL(LOW),CLOSE,LOW)+CLOSE)/3;  

    :(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));  

    a:100;  

    b:-100;  

    VAR1:=REF(CLOSE,2);  

    A2:=SMA(MAX(CLOSE-VAR1,0),7,1)/SMA(ABS(CLOSE-VAR1),7,1)*100,,COLOR00FF00;  

    STICKLINE(A2 REF(A2,1)ANDA2 79,1.02*HIGH,1.01*HIGH,5,0),COLOR00FFFF;  

    DRAWTEXT(A2 REF(A2,1)ANDA2 79,1.01*HIGH,'波段顶'),COLORF000F0;  

    DIF:EMA(C,5)-EMA(C,30),COLORSTICK;  

    M:=89;  

    N:=14;  

    TYP:=(IF(ISNULL(HIGH),CLOSE,HIGH)+IF(ISNULL(LOW),CLOSE,LOW)+CLOSE)/3;  

    cci2:(TYP-ma(TYP,M))/(0.015*AVEDEV(TYP,M));  

    CCI3:(TYP-MA(TYP,M))/(0.015*AVEDEV(TYP,M));  

    CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));  

    a:100;  

    b:-100;  

    DEA:=EMA(DIF,5);  

    DIF,COLORGREEN;  

    DEA,COLORGREEN;  

    零上买:0,COLORBLUE,CROSSDOT,LINETHICK2;  

    IF(DIF DEA,DIF,DRAWNULL),COLORRED,LINETHICK2;  

    IF(DEA REF(DEA,1),DEA,DRAWNULL),COLORMAGENTA;  

    DRAWICON(CROSS(DIF,DEA),DEA,1);  

    DRAWICON(CROSS(DEA,DIF),DEA,2);  

    Var1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;  

    AAF:LLV(LOW,34),LINETHICK1,COLORFFFFCC;  

    BBF:ma(AAF,4),LINETHICK1,COLORYELLOW;  

    TYP:=(HIGH+LOW+CLOSE)/3;  

    cci1:=(TYP-MA(TYP,6))/(0.015*AVEDEV(TYP,5));  

    差值1:=Abs(REF(CCI1,1)-CCI1);  

    CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));  

    差值2:=ABS(REF(CCI2,1)-CCI2);  

    CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));  

    差值3:=ABS(REF(CCI3,1)-CCI3);  

    CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));  

    差值4:=ABS(REF(CCI4,1)-CCI4);  

    CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));  

    差值5:=ABS(REF(CCI5,1)-CCI5);  

    CCI:=CCI1+CCI2+CCI3+CCI4+CCI5;  

    AAA:=(3*C+H+L+O)/6;  

    VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)  

    +4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;  

    VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/3;  

    VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;  

    VAR4:=(HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;  

    VAR5:=(LLV(VAR3,5)+LLV(VAR3,10)+LLV(VAR3,20))/3;  

    VAR6:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;  

    :VAR1,COLORWHITE;  

    :VAR6,COLORYELLOW;  

    下跌:IF(VAR1=VAR6,VAR6,0),COLORGREEN,LINETHICK0;  

    PARTLINE(VAR6,VAR1=VAR6),COLORGREEN;  

    TJ1:=CCI1  

    立桩量:=FILTER(TJ1,0){,NODRAW};  

    TJ2:=IF(BArslAst(立桩量)=1,1,0);  

    {STICKLINE(立桩量 1,REF(HIGH,BARSLAST(立桩量)),  

    REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN;}  

    成立1:=TJ2=1;  

    条件成立1:=FILTER(成立1,5);  

    DRAWTEXT(条件成立1,REF(HIGH,BARSLAST(立桩量)),'看跌'),COLORBLUE;  

    TJ11:=CCI1 -差值4;  

    立桩量2:=FILTER(TJ11,0){,NODRAW};  

    TJ22:=IF(BARSLAST(立桩量2)=1ANDCLOSE REF(HIGH,1),1,0);  

    2:=TJ22=1;  

    {STICKLINE(CLOSEAND(下跌 VAR6),REF(LOW,BARSLAST(立桩量2)),  

    REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW;}  

    TJ:=IF(BARSLAST(立桩量2)=1ANDCLOSE REF(LOW,1),1,0);  

    成立2:=TJ=1;  

    条件成立2:=FILTER(成立2,5);  

    DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)),'看涨'),COLORMAGENTA;  

    TJ111:=ABS(CCI1) CCIANDABS(差值1) ABS(差值5);  

    立桩量3:=FILTER(TJ111,3);  

    TJ3:=IF(BARSLAST(立桩量3)=1ANDCLOSE REF(LOW,1),1,IF(BARSLAST(立桩量3)=2ANDCLOSE REF(LOW,2),1,IF(BARSLAST(立桩量3)=3ANDCLOSE REF(LOW,3),1,0)));  

    成立:=TJ3=1;  

    条件成立:=FILTER(成立,5);  

    DRAWTEXT(条件成立AND下跌 VAR6,L*0.97,'☆成立');  

    LC:=REF(CLOSE,1);  

    :=((SMA(MAX((CLOSE-LC),0),3,1)/SMA(ABS((CLOSE-LC)),3,1))*100);  

    FF:=EMA(CLOSE,3);  

    MA15:=EMA(CLOSE,21);  

    N:=5;  

    Var1:=N;  

    等待:1.00*Var1;  

    1.073*Var1,POINTDOT;  

    1.118*Var1,POINTDOT;  

    返复:1.191*Var1;  

    1.264*Var1,POINTDOT;  

    1.309*Var1,POINTDOT;  

    虎口:1.382*Var1;  

    1.472*Var1,POINTDOT;  

    1.528*Var1,POINTDOT;  

    不宜:1.618*Var1;  

    1.691*Var1,POINTDOT;  

    1.736*Var1,POINTDOT;  

    险峰:1.809*Var1;  

    DRAWTEXT(crOSS(FF,MA15),BBF,'底背离'),COLORA6E500;  

    DRAWTEXT(CROSS(88,RSI),(HIGH*1.02),'顶背离'),COLOR1880FF;  

    X1:=(C+L+H)/3;  

    BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;  

    EMA8:=EMA(C,8);  

    DRAWTEXT(FILTER(BB13 1ANDEMA(X1,13) REF(EMA(X1,8),1),10),  

    EMA8,'∠45'),COLORWHITE;  

    STICKLINE(C O,C,O,6,0),COLOR0000FF;  

    STICKLINE(C O,C,O,6,0),COLOR666600;  

    STICKLINE(立桩量,C,O,6,0),COLOR0000FF;  

    STICKLINE(1,C,O,0,0),COLORCCCCCC;  

    山还是山:SMA(C,125,1),COLORYELLOW;  

    B1:=MA(C,1);  

    B2:SMA(SMA(SMA(B1,2,1),2,1),2,1),COLORRED;  

    SMA2:MA(B2,2),COLORCYAN;  

    箱顶:HHV(MA(B2,2),58),COLOR00AAFF;  

    IF(B2 SMA2,SMA2,DRAWNULL),COLORFFA93F,LINETHICK2;  

    10:=EMA(CLOSE,10);  

    25:EMA(CLOSE,25),COLORWHITE;  

    40:EMA(CLOSE,40),COLOR00AA00;  

    80:EMA(CLOSE,80),COLORFFFF00;  

    125:SMA(C,125,1),COLORYELLOW;  

    VAR1:=(100-((90*(HHV(HIGH,21)-CLOSE))/(HHV(HIGH,21)-LLV(LOW,21))));  

    VAR3:=(100-MA(((100*(HHV(HIGH,6)-CLOSE))/(HHV(HIGH,6)-LLV(LOW,6))),34));  

    少爷分水岭:SMA(MA(C,5),430,1),COLORB48F33,LINETHICK2;  

    买:DRAWTEXT(CROSS(VAR1,MA(VAR3,VAR1))ANDB2 SMA2,(LOW*0.97),'←⊙买'),COLORRED;  

    DRAWTEXT(CROSS(C,10)ANDVAR3 1ANDB2 SMA2,L*0.99,'←※'),COLORWHITE,LINETHICK2;  

    DRAWTEXT(CROSS(C,25)ANDVAR3 1ANDB2 SMA2,L*0.99,'←◇'),COLORGREEN,LINETHICK2;  

    DRAWTEXT(CROSS(C,40)ANDVAR3 1ANDB2 SMA2,L*0.99,'←□'),COLORRED,LINETHICK2;  

    DRAWTEXT(CROSS(C,80)ANDVAR3 1ANDB2 SMA2,L*0.99,'←○'),COLORCCFF66,LINETHICK2;  

    DRAWTEXT(CROSS(C,125)ANDVAR1 1,L*0.99,'←△'),COLORYELLOW,LINETHICK2;  

    {牛熊界:MA(CLOSE,49),LINETHICK2,COLORGRAY;};  


    image.png


    [源码注释]通达信公式动态公式解读




    AA赋值:以收盘价计算的获利盘比例*100

    输出XG:(AA-1日前的AA) =20

    image.png

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