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

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

    压力与支撑

    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),LINETHICK0;
    CCI2:=(TYP-MA(TYP,10))/(0.015*AVEDEV(TYP,10));
    差值2:=ABS(REF(CCI2,1)-CCI2),LINETHICK0;
    CCI3:=(TYP-MA(TYP,20))/(0.015*AVEDEV(TYP,20));
    差值3:=ABS(REF(CCI3,1)-CCI3),LINETHICK0;
    CCI4:=(TYP-MA(TYP,30))/(0.015*AVEDEV(TYP,30));
    差值4:=ABS(REF(CCI4,1)-CCI4),LINETHICK0;
    CCI5:=(TYP-MA(TYP,60))/(0.015*AVEDEV(TYP,60));
    差值5:=ABS(REF(CCI5,1)-CCI5),LINETHICK0;
    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;

    下跌:IF(VAR1=VAR6,VAR6, DRAWNULL),COLORGREEN;
    TJ1:= CCI1>差值4;
    立桩量:=FILTER(TJ1,0),NODRAW;
    TJ2:=IF(BARSLAST(立桩量)=1 ,1,0);
    STICKLINE(立桩量 !=1,REF(HIGH,BARSLAST(立桩量)),
    REF(HIGH,BARSLAST(立桩量)),1,1),COLORCYAN;
    {STICKLINE(立桩量 !=1,REF(LOW,BARSLAST(立桩量)),
    REF(LOW,BARSLAST(立桩量)),1,1),COLORCYAN;}
    成立1:=TJ2=1;
    条件成立1:=FILTER(成立1,5);
    DRAWTEXT(条件成立1, REF(HIGH,BARSLAST(立桩量)),'看跌'),COLORLIBLUE;
    TJ11:= CCI1<-差值4 ;
    立桩量2:=FILTER(TJ11,0),NODRAW;
    TJ22:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(HIGH,1),1,0);
    突破2:=TJ22=1;
    {STICKLINE(CLOSE AND 下跌!= VAR6,REF(HIGH,BARSLAST(立桩量2)),
    REF(HIGH,BARSLAST(立桩量2)),1,1),COLORYELLOW;}
    STICKLINE(CLOSE AND 下跌!= VAR6,REF(LOW,BARSLAST(立桩量2)),
    REF(LOW,BARSLAST(立桩量2)),1,1),COLORYELLOW;
    TJ:=IF(BARSLAST(立桩量2)=1 AND CLOSE>REF(LOW,1),1,0);
    成立2:=TJ=1;
    条件成立2:=FILTER(成立2,5);
    DRAWTEXT(条件成立2,REF(LOW,BARSLAST(立桩量2)),'看涨'),COLORLIMAGENTA;
    TJ111:=ABS(CCI1)>CCI AND ABS( 差值1)> ABS(差值5);
    立桩量3:=FILTER(TJ111,3);
    TJ3:=IF(BARSLAST(立桩量3)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量3)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量3)=3 AND CLOSE>REF(LOW,3),1,0)));
    成立:=TJ3=1;
    条件成立:=FILTER(成立,5);
    DRAWTEXT(条件成立 AND 下跌!= VAR6,L*0.97,'☆成立');
    LC:=REF(CLOSE,1);
    RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
    FF:=EMA(CLOSE,3);
    MA15:=EMA(CLOSE,21);
    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>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),
    EMA8,'∠45'),COLORWHITE;

    STICKLINE(1,C,O,2.8,0),COLOR666600;
    STICKLINE(立桩量,C,O,2.8,0),COLOR0000FF;
    STICKLINE(1,C,O,0,0),COLORCCCCCC;

     

    黄金分割线:MA(CLOSE,60),COLORYELLOW,LINETHICK2;
    MA3:=MA(C,3);
    YTSL:=(3*C+L+O+H)/6;
    PMA:MA(C,5),COLORWHITE,LINETHICK1;
    IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK2;
    IF(PMA MA60:MA(C,60),LINETHICK1;
    生命线:EMA(C,453),COLORBLUE,LINETHICK2;
    线:=EMA(C,4);
    卖线:=EMA(SLOPE(C,9)*20+C,42);
    涨:IF(卖线>=REF(卖线,1),卖线,DRAWNULL),POINTDOT,COLORMAGENTA,LINETHICK4;
    跌:IF(卖线 EMA34:EMA(C,34),COLORFF00FF,LINETHICK2;
    IF(EMA34
    HIGHN:=10;LOWN:=10;HIGHDISPLAY:=0;LOWDISPLAY:=0;ZGDISPLAY:=0;MADISPLAY:=0;
    AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);
    QY:=BACKSET(AA,HIGHN+1);
    CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);
    DRAWICON(CC,H*1.02,2);
    DDD:=BARSLAST(CC);
    GDTS:=IF(CC,CURRBARSCOUNT,0);
    DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
    DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
    DINGBU1:=REF(DINGBU,DDD+1);
    GDCS1:=CONST(DINGBUTS);
    DINGBUTS1:=REF(DINGBUTS,DDD+1);
    GDCS2:=CONST(DINGBUTS1);
    DINGBU2:=REF(DINGBU1,DDD+1);
    MMM:=IF(CURRBARSCOUNT>GDCS2,0,1);
    高点压力:DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1) COLORGREEN,LINETHICK1;
    DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR0055FF,POINTDOT,LINETHICK3;
    DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLORYELLOW,POINTDOT,LINETHICK3;
    AA1:=REF(L,LOWN)=LLV(L,2*LOWN+1);
    QY1:=BACKSET(AA1,LOWN+1);
    CC1:=FILTER(QY1,LOWN) AND L=LLV(L,LOWN+1);
    {DRAWICON(CC1,L*0.98,1);}
    DD1:=BARSLAST(CC1);
    DDTS:=IF(CC1,CURRBARSCOUNT,0);
    YDB:=IF(DD1,REF(L,DD1),L);
    DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);
    DDCS1:=CONST(DDTS1);
    ZDB:=REF(YDB,DD1+1);
    DDTS2:=REF(DDTS1,DD1+1);
    DDCS2:=CONST(DDTS2);
    低点支撑:DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1) COLORRED,LINETHICK1;
    ZGSTAR:=(高点压力+低点支撑)/2;
    ZGEND:=CONST((高点压力+低点支撑)/2);
    STARDAY:=IF(DDCS2 中轨:DRAWLINE(CURRBARSCOUNT=STARDAY,ZGSTAR,ISLASTBAR,ZGEND,1),
    COLORFF55FF,LINETHICK1;
    DRAWLINE(CURRBARSCOUNT=DDCS1,L,ISLASTBAR,
    REF(L,DDCS1-1),1),COLORFF00FF,POINTDOT,LINETHICK4;
    DRAWLINE(CURRBARSCOUNT=DDCS2,L,ISLASTBAR,
    REF(L,DDCS2-1),1),COLORGREEN,POINTDOT,LINETHICK4;

    GJ:=(C+H+L+O)/4;
    明日阻力:=L+(GJ-L)+(C-L),LINETHICK2;
    明日支撑:=L+(C-GJ),LINETHICK2;
    今日阻力:=REF(明日阻力 , 1),LINETHICK2;
    今日支撑:=REF(明日支撑 , 1),LINETHICK2;
    STICKLINE(ISLASTBAR,今日阻力,今日阻力,10,1),LINETHICK4,COLOR0000FF;
    STICKLINE(ISLASTBAR,今日支撑,今日支撑,10,1),LINETHICK4,COLOR00FFFF;
    下档线:=(((CLOSE - LLV(LOW,13)) / (HHV(HIGH,13) - LLV(LOW,13))) * 100);
    RRRSV:=SMA(下档线,3,1);
    KKK:=SMA(RRRSV,3,1);

    JJ12:=(((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100);
    RSV24:=SMA(JJ12,3,1);
    K24:=SMA(RSV24,3,1);
    D24:=((3 * RSV24) - (2 * K24));
    压力2:=IF(CROSS(D24,DDD),HIGH,REF(HIGH,BARSLAST(CROSS(D24,DDD)))),COLORFFFFFF;
    压力位:=IF(ISLASTBAR,压力2,DRAWNULL);
    STICKLINE(ISLASTBAR ,压力位,压力位,120,0),LINETHICK4,COLORFFFFFF;
    底部:=LLV(HIGH,30),COLOR00FF00;
    底部位:=IF(ISLASTBAR,底部,DRAWNULL);
    STICKLINE(ISLASTBAR ,底部位,底部位,100,0),LINETHICK4,COLOR00FF00;
    A1:=REF(H,8)=HHV(H,2*8+1);
    B1:=FILTER(A1,8);

     


    A2:=REF(L,8)=LLV(L,2*8+1);
    B2:=FILTER(A2,8);
    C2:=BACKSET(B2,8+1);
    D2:=FILTER(C2,8);{低点}
    T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1); U11:=T11>REF(T11,1);
    DRAWLINE(D2,L,U11,L,1),COLORGREEN,LINETHICK2;
    M:=INTPART(3*8/5);
    A12:=REF(H,M)=HHV(H,2*M+1);
    B12:=FILTER(A12,M);
    C12:=BACKSET(B12,M+1);
    D12:=FILTER(C12,M);{高点}
    R112:=BACKSET(ISLASTBAR,BARSLAST(D12)+1); S112:=R112>REF(R112,1);
    DRAWLINE(D12,H,S112,H,1),COLORRED,LINETHICK2;
    A22:=REF(L,M)=LLV(L,2*M+1);
    B22:=FILTER(A22,M);
    C22:=BACKSET(B22,M+1);
    D22:=FILTER(C22,M);{低点}
    T112:=BACKSET(ISLASTBAR,BARSLAST(D22)+1); U112:=T112>REF(T112,1);
    DRAWLINE(D22,L,U112,L,1),COLORRED,LINETHICK2;
     


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 通达信压力与支撑源码主图 加入收藏