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

    正文概述    2024-05-04 04:17:24  


    通达信公式源码概况:


    指标类别:通达信公式


    授权方式: 免费版


    指标评级: ★★★★★


    指标分类: 策略


    画线方法: 副图

    公式解读:


    公式源码如下:


     

    低吸:0.82*MA(FORCAST(CLOSE,2),40),COLORF7E300;满仓:0.72*MA(FORCAST(CLOSE,2),40),COLOR0000FF; 

    VAR1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100; 

    VAR2:=(CLOSE-REF(CLOSE,2))/REF(CLOSE,2)*100; 

    VAR3:=(CLOSE-REF(CLOSE,3))/REF(CLOSE,3)*100; 

    VAR4:=(CLOSE-REF(CLOSE,4))/REF(CLOSE,4)*100; 

    VAR5:=(CLOSE-REF(CLOSE,5))/REF(CLOSE,5)*100; 

    VAR6:=(CLOSE-REF(CLOSE,6))/REF(CLOSE,6)*100; 

    VAR7:=(CLOSE-REF(CLOSE,7))/REF(CLOSE,7)*100; 

    VAR8:=(CLOSE-REF(CLOSE,8))/REF(CLOSE,8)*100; 

    VAR9:=(CLOSE-REF(CLOSE,9))/REF(CLOSE,9)*100; 

    VAR10:=(CLOSE-REF(CLOSE,10))/REF(CLOSE,10)*100; 

    VAR11:=(CLOSE-REF(CLOSE,11))/REF(CLOSE,11)*100; 

    VAR12:=(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100; 

    VAR13:=(CLOSE-REF(CLOSE,13))/REF(CLOSE,13)*100; 

    VAR14:=(CLOSE-REF(CLOSE,14))/REF(CLOSE,14)*100; 

    VAR15:=(CLOSE-REF(CLOSE,15))/REF(CLOSE,15)*100; 

    VAR16:=(CLOSE-REF(CLOSE,16))/REF(CLOSE,16)*100; 

    VAR17:=(CLOSE-REF(CLOSE,17))/REF(CLOSE,17)*100; 

    VAR18:=(CLOSE-REF(CLOSE,18))/REF(CLOSE,18)*100; 

    VAR19:=(CLOSE-REF(CLOSE,19))/REF(CLOSE,19)*100; 

    VAR20:=(CLOSE-REF(CLOSE,20))/REF(CLOSE,20)*100; 

    顶:=85; 

    中:=50; 

    底:=20; 

    VAR1:=HHV(HIGH,9)-LLV(LOW,9); 

    VAR2:=HHV(HIGH,9)-CLOSE; 

    VAR3:=CLOSE-LLV(LOW,9); 

    VAR4:=VAR2/VAR1*100-70; 

    VAR5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100; 

    VAR6:=(2*CLOSE+HIGH+LOW)/4; 

    VAR7:=SMA(VAR3/VAR1*100,3,1); 

    VAR8:=LLV(LOW,34); 

    VAR9:=SMA(VAR7,3,1)-SMA(VAR4,9,1); 

    VARA:=IF(VAR9 100,VAR9-100,0); 

    VARB:=HHV(HIGH,34); 

    AA:=VARA*2; 

    BB:=EMA((VAR6-VAR8)/(VARB-VAR8)*100,13); 

    VARC:=EMA(0.667*REF(BB,1)+0.333*BB,2); 

    CC:SMA(VAR5,20,1),COLORRED; 

    CC1:SMA(CC,5,1),COLORGREEN; 

    STICKLINE(CC CC1,CC,CC1,1,0),COLORRED; 

    STICKLINE(CC1 CC,CC,CC1,1,0),COLORGREEN; 

    出击:IF((CROSS(CC,CC1)AND(CC1 顶)),80,0),COLORRED; 

    DRAWICON(CC REF(CC,1)ANDREF(CC,1) REF(CC,2)ANDCC CC1,100,2); 

    DRAWICON(CROSS(CC1,CC),100,15); 

    VAR21:=VAR1+VAR2+VAR3+VAR4+VAR5; 

    VAR22:=VAR1+VAR2+VAR3+VAR4+VAR5+VAR6+VAR7+VAR8+VAR9+VAR10; 

    VAR23:=VAR1+VAR2+VAR3+VAR4+VAR5+VAR6+VAR7+VAR8+VAR9+VAR10+VAR11+VAR12+VAR13+VAR14+VAR15+VAR16+VAR17+VAR18+VAR19+VAR20; 

    VAR24:=(SUM(VAR21,3)*30-MA(SUM(VAR21,3),45))/10; 

    VAR25:=(VAR22*30-REF(SUM(VAR22,3),1))/10; 

    VAR26:=(VAR21*30-REF(SUM(VAR21,3),1))/10; 

    VAR27:=400; 

    VAR28:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100; 

    VAR29:=SUM(VAR28,3)*30-MA(SUM(VAR28,3),45); 

    VAR30:=VAR28*30-REF(SUM(VAR28,3),1); 

    NOTEXT1:100; 

    NOTEXT2:-100; 

    1:(VAR25+VAR26+VAR24+VAR29+VAR30)/5,COLORMAGENTA; 

    CCI2:CCI,COLORWHITE; 

    DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26); 

    DEA:=EMA(DIFF,9); 

    A1:=BARSLAST(REF(CROSS(DIFF,DEA),1)); 

    A:=MA(CLOSE,17)+ABS(MA(CLOSE,17)-REF(MA(CLOSE,17),1)); 

    B:=MA(CLOSE,17)+MA(CLOSE,17)-REF(MA(CLOSE,17),1); 

    分水岭:IF(MA(CLOSE,17) B,B,MA(CLOSE,17)),COLORFF00FF,LINETHICK2; 

    操作线:分水岭-(EMA(C,3)-分水岭),COLOR00FFFF,LINETHICK2; 

    PM:Ma(C,5),COLORred,linethick2; 

    IF(PM 分水岭,PM,pm),Color0000FF,linethick2; 

    IF(PM 分水岭,分水岭,a),ColoR00ff00,POINTDOT,linethick4; 

    IF(C PM,PM,PM),ColorFF9900,linethick2; 

    IF(PM 分水岭,分水岭,pm),Color0000FF,linethick2; 

    DRAWICON(CROSS(分水岭,操作线),分水岭-0.02,1); 

    {} 

    A1:=BARSLAST(ref(cross( .diff (12,26,9), macd.dea (12,26,9)),1)); 

    B1:=ref(c,A1+1) candref( macd.diff (12,26,9),A1+1) macd.diff (12,26,9)andcross( macd.diff (12,26,9), macd.dea (12,26,9)); 

    DRAWTEXT(FILTER(B1 0,5),L-0.12, M底 ),COLORRED; 

    A2:=BARSLAST(ref(cross( .k (9,9,3), kdj.d (9,9,3)),1)); 

    B2:=ref(c,A2+1) candref( kdj.k (9,9,3),A2+1) kdj.k (9,9,3)andcross( kdj.k (9,9,3), kdj.d (9,9,3)); 

    DRAWTEXT(FILTER(B2 0,5),L-0.08, K底 ),COLORFF00FF; 

    A3:=BARSLAST(ref(cross( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24)),1)); 

    B3:=ref(c,A3+1) candref( RSI.RSI1 (6,12,24),A3+1) RSI.RSI1 (6,12,24)andcross( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24)); 

    DRAWTEXT(FILTER(B3 0,5),L-0.02, R底 ),COLORffcc66; 

    C1:=BARSLAST(ref(cross( macd.dea (12,26,9), macd.diff (12,26,9)),1)); 

    D1:=ref(c,C1+1) candref( macd.diff (12,26,9),C1+1) macd.diff (12,26,9)andcross( macd.dea (12,26,9), macd.diff (12,26,9)); 

    DRAWTEXT(FILTER(D1 0,5),H+0.24, M顶 ),COLOR0066FF; 

    C2:=BARSLAST(ref(cross( kdj.d (9,9,3), kdj.k (9,9,3)),1)); 

    D2:=ref(c,C2+1) candref( kdj.k (9,9,3),C2+1) kdj.k (9,9,3)andcross( kdj.d (9,9,3), kdj.k (9,9,3)); 

    DRAWTEXT(FILTER(D2 0,5),H+0.16, K顶 ),COLOR00FF00; 

    C3:=BARSLAST(ref(cross( RSI.RSI2 (6,12,24), RSI.RSI1 (6,12,24)),1)); 

    D3:=ref(c,C3+1) candref( RSI.RSI1 (6,12,24),C3+1) RSI.RSI1 (6,12,24)andcross( RSI.RSI2 (6,12,24), RSI.RSI1 (6,12,24)); 

    DRAWTEXT(FILTER(D3 0,5),H+0.08, R顶 ),COLORffffCC; 

    B1:=REF(C,A1+1) CANDREF(DIFF,A1+1) DIFFANDCROSS(DIFF,DEA); 

    A2:=BARSLAST(REF(CROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)),1)); 

    B2:=REF(C,A2+1) CANDREF( KDJ.K (9,3,3),A2+1) KDJ.K (9,3,3)ANDCROSS( KDJ.K (9,3,3), KDJ.D (9,3,3)); 

    A3:=BARSLAST(REF(CROSS( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24)),1)); 

    B3:=REF(C,A3+1) CANDREF( RSI.RSI1 (6,12,24),A3+1) RSI.RSI1 (6,12,24)ANDCROSS( RSI.RSI1 (6,12,24), RSI.RSI2 (6,12,24)); 

    底背离:B1 0ORB2 0ORB3 0; 

    A1:=(REF(LOW,1)=REF(OPEN,1))AND(REF(OPEN,0)=REF(LOW,0))AND(REF(CLOSE,1) REF(OPEN,1))AND(REF(CLOSE,0) REF(OPEN,0));

    A2:=REF(VOL,0) REF(VOL,1); 

    A3:=REF(OPEN,0) REF(CLOSE,1); 

    A4:=REF(CLOSE,0) REF(CLOSE,1); 

    XG:A1ANDA2ANDA3ANDA4; 

    :=3*SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1)-2* 

    SMA(SMA((C-LLV(L,27))/(HHV(H,27)-LLV(L,27))*100,5,1),3,1); 

    ZZ:=趋势 REF(趋势,1); 

    K1:=DVOL/1000000; 

    K2:=DCLOSE; 

    V1:=EMA(K1,5); 

    V2:=EMA(K2,5); 

    价异动:=K2 REF(V2,1)*1.06; 

    量异动:=K1 REF(V1,1)*1.6 amp; amp;ZZ; 

    停牌:=DYNAINFO(17) 0; 

    M1:=SUM(价异动,2) 0AND停牌; 

    M2:=SUM(量异动,2) 0ANDREF(趋势,1) 89; 

    量价:FILTER(M1 amp; amp;M2,3)*66; 

    M:=MACD.MACD; 

    M5:=MA(C,5); 

    F:=MACD.DIF; 

    D:=MACD.DEA; 

    TJF:=EVERY(BETWEEN(F,0,0.35),18); 

    TJD:=EVERY(BETWEEN(D,0,0.30),18); 

    TJM:=M5 REF(M5,1); 

    XG:=EVERY(BETWEEN(M,0,0.23),30)ANDTJFANDTJDANDTJM; 

    XG1:=CROSS(XG,0.5); 

    STICKLINE(XG1,L,H,0,0),COLOR0088EE; 

    STICKLINE(XG1,CLOSE,OPEN,3,0),COLOR0055AA; 

    STICKLINE(XG1,CLOSE,OPEN,2.8,0),COLOR0066BB; 

    STICKLINE(XG1,CLOSE,OPEN,2.5,0),COLOR0077CC; 

    STICKLINE(XG1,CLOSE,OPEN,2.2,0),COLOR0088DD; 

    STICKLINE(XG1,CLOSE,OPEN,1.7,0),COLOR0099EE; 

    STICKLINE(XG1,CLOSE,OPEN,1.2,0),COLOR00AAFF; 

    STICKLINE(XG1,CLOSE,OPEN,0.7,0),COLOR00CCFF; 

    STICKLINE(XG1,CLOSE,OPEN,0.2,0),COLOR00FFFF; 

    DRAWICON(XG1,L*0.95,1);TYP:=(HIGH+LOW+CLOSE)/3;CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));CCI修正1:=EMA(EMA(EMA(CCI,2),2),2);CCI修正2:=EMA(EMA(EMA(CCI,3),2),2);X:=(CROSS(CCI修正1,CCI修正2)OR(CCI修正1 =CCI修正2))ANDCCI修正1 =-101ANDCCI修正1 =REF(CCI修正1,1)ANDREF(CCI修正1,1) -101;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;K1:=EMA(EMA(EMA(K,2),2),2);D1:=EMA(EMA(EMA(D,2),2),2);J1:=EMA(EMA(EMA(J,2),2),2);Y:=J1 REF(J1,1);XANDY; 

    A☆:=DMA((H+L+C*2)/4,0.9); 

    B☆:=VOL/((H-L)*2-ABS(C-O)); 

    C☆☆:=IF(C O,B☆*(H-L),IF(C O,B☆*(H-O+(C-L)),VOL/2))+IF(C O,0-B☆*(H-C+(O-L)),IF(C O,0-B☆*(H-L),0-VOL/2)); 

    A☆☆:=C☆☆/20/1.15; 

    攻击流量:=A☆☆*0.618+REF(A☆☆,1)*0.382+REF(HSL,2)*0.168; 

    B☆☆:=EMA(攻击流量,3); 

    流量:=IF(B☆☆ REF(B☆☆,1),1,0); 

    AA☆:=(MAX(C,O)-MIN(C,O))/MIN(C,O) 0.00618; 

    BB☆:=(H-MAX(C,O))/MAX(C,O) 0.00382; 

    DD☆:=(MIN(C,O)-L)/L 0.00382; 

    EE☆:=(ABS(BB☆-DD☆))/C 0.00618; 

    星☆星:=AA☆ANDBB☆ANDDD☆ANDEE☆; 

    星线选:星☆星=1AND流量=1ANDC OANDABS((C-MA(C,20))/MA(C,20)) 0.0382ANDH-MAX(C,O) =MIN(C,O)-L,COLORYELLOW; 

    确认选:IF(REF(星线选,1)=1ANDC =REF(C,1),1,0)ANDC OAND(C-REF(C,1))/REF(C,1) 0.00618,COLORRED; 


    image.png


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


    AA赋值:(收盘价-1日前的收盘价)/1日前的收盘价*100

    输出XG:AA =4 AND (最高价-收盘价) (收盘价-开盘价)*0.4




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