突破变色指标公式

   DRAWGBK(C>0,RGB(0,0,0),RGB(00,0,0),0,'背景图片',0);DRAWKLINE(H,O,L,C);

    DRAWGBK(C>0,RGB(0,0,00),RGB(0,0,0),0,'3',0);

    DRAWNUMBER(ISLASTBAR,C,C),COLORMAGENTA;

    N8:=STRCAT(CON2STR(YEAR,0),'年');

    Y8:=STRCAT(CON2STR(MONTH,0),'月');

    R8:=STRCAT(CON2STR(DAY,0),'日');

    VAR1:=C=HHV(C,4)ANDREF(C,1)=LLV(C,4);

    VAR2:=C=LLV(C,4)AND(REF(C,1)<REF(C,2)ORREF(C,1)<REF(C,3))OR

    REF(C,1)=LLV(C,4)ANDC<REF(C,2)ORREF(C,2)=LLV(C,4)ANDREF(C,1)=HHV(C,4)

    ANDC<REF(C,1)ORREF(C,3)=LLV(C,4)ANDC<REF(C,1)ANDC<REF(C,2);

    VAR3:=REF(C,1)=LLV(C,4)ANDC>=REF(C,2)ORREF(C,2)=LLV(C,4)AND

    REF(C,1)<=REF(C,3)ANDREF(C,2)=REF(C,1);

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

    VAR4:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+

    14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*

    REF(A,12)

    +7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+R

    EF(A,20))/210;

    MTM:=C-REF(C,1);

    DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);

    CB:=EMA(VAR4,13);

    A0:=(L+H+C*2)/4;

    SJ8:=STRCAT(STRCAT(N8,Y8),R8);

    A1:EMA(A0,14)COLORBLUE,LINETHICK2;

    A2:=EMA(A0,25)COLORLIBLUE,LINETHICK2;

    A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;

    A2X:=(A2-REF(A2,1))/REF(A2,1)*100,NODRAW;

    买入持股:IF(A1X>=0,A1,DRAWNULL)COLORRED,LINETHICK2;

    卖出空仓:IF(A1X<0ANDA2X<0,A1,DRAWNULL)COLORGREEN,LINETHICK2;

    多:IF(A>=REF(A,1),A,DRAWNULL),COLORRED,LINETHICK2;

    空:IF(A<=REF(A,1),A,DRAWNULL),COLORGREEN,LINETHICK2;

    突破:=REF(EMA(C,13),1);

    多方:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),DRAWNULL);

    空方:=IF(A1X<0,REF(EMA(C,10),BARSLAST(CROSS(0,A1X))+1),DRAWNULL);

    STICKLINE(A1X>=0,多方,突破,0,0),COLOR000099;

    STICKLINE(A1X<0,空方,突破,0,0),COLOR007700;

    今日保护价:(REF(C,2)+REF(C,1)+O)/3,COLORCC3299,NODRAW;

    高点:IF(CURRBARSCOUNT<=60,CONST(IF(ISLASTBAR=1,HHV(H,

    BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORRED,DOTLINE;

    低点:IF(CURRBARSCOUNT<=60,CONST(IF(ISLASTBAR=1,LLV(L,

    BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;

    STICKLINE(cci>=200ANDH>=高点,O,C,3,0),COLORBLUE;

    STICKLINE(CCI<=100ANDL<=低点,O,C,3,0),COLORYELLOW;

    DRAWTEXT(ISLASTBAR,高点,'高点'),COLORRED;

    DRAWTEXT(ISLASTBAR,低点,'低点'),COLORMAGENTA;{COLORBLUE;};

    {红}

    STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3,0),COLOR0000FF;

    STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF;

    {蓝}

    STICKLINE(CLOSE<OPEN,CLOSE,OPEN,3,0),COLORFF9900;

    STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.5,0),COLORFFCC00;

    {粉}

    STICKLINE(VAR1,C,(O+C)/2,3,0),COLORFF11FF;

    STICKLINE(VAR1,C,(O+C)/2,0.5,0),COLORFFDDFF;

    {灰}

    STICKLINE(VAR2,C,(O+C)/2,3,0),COLOR999999;

    STICKLINE(VAR2,C,(O+C)/2,0.5,0),COLORFFBBFF;

    {绿}

    STICKLINE(VAR3,O,(O+C)/2,3,0),COLOR00BB00;

    STICKLINE(VAR3,O,(O+C)/2,0.5,0),COLOR00FF00;

    DRAWTEXT_FIX(C>0,0.88,0,0,SJ8),COLOR00FFFF;

    卖:=HHV(DX,2)=HHV(DX,7)ANDCOUNT(DX>50,2)ANDCROSS(MA(DX,2),DX);

    DRAWTEXT(FILTER(卖=1,1),HIGH*1.02,'冲高卖'),COLORGREEN;

    买:=LLV(DX,2)=LLV(DX,7)ANDCOUNT(DX<0,2)ANDCROSS(DX,MA(DX,2));

    DRAWTEXT(FILTER(买=1,0),LOW-0.02,'买'),COLORRED;

    加仓:=SMA(EMA((C-REF(C,1))/REF(C,1),5)*100,3,1)*10;

    DRAWTEXT(FILTER((CROSS(加仓,0)ORCROSS(CLOSE,CB))AND买

    =1,3),LOW-0.03,''),COLORWHITE;

    超B:=L2_AMO(0,2)/10000.0;

    大B:=L2_AMO(1,2)/10000.0;

    中B:=L2_AMO(2,2)/10000.0;

    小B:=L2_AMO(3,2)/10000.0;

    超S:=L2_AMO(0,3)/10000.0;

    大S:=L2_AMO(1,3)/10000.0;

    中S:=L2_AMO(2,3)/10000.0;

    小S:=L2_AMO(3,3)/10000.0;

    TESTSKIP(NOT(超BOR大BOR中BOR小BOR超SOR大SOR中SOR小S)!=0);

    大宗进:=(超B)+(大B),NODRAW;

    大宗出:=(超S)+(大S),NODRAW;

    非大宗进:=(中B)+(小B),NODRAW;

    非大宗出:=(中S)+(小S),NODRAW;

    DAZHIV:=CONST(MAX(ABS(大宗进),MAX(ABS(大宗出),MAX(ABS(非大宗进),ABS(非大宗

    出))))),NODRAW;

    DRAWRECTREL(0,CONST(950-(ABS(大宗进)*250/DAZHIV))-20,30,950,IF(CONST(大宗

    DRAWRECTREL(32,CONST(950-(ABS(大宗出)*250/DAZHIV))-20,62,950,IF(CONST(大宗

    出>0),RGB(23,125,255),RGB(255,0,0)));

    DRAWRECTREL(92,CONST(950-(ABS(非大宗进)*250/DAZHIV))-20,122,950,IF(CONST(非

    大宗进>0),RGB(255,0,0),RGB(23,125,255)));

    DRAWRECTREL(124,CONST(950-(ABS(非大宗

    出)*250/DAZHIV))-20,154,950,IF(CONST(非大宗出>0),RGB(23,125,255),RGB(255,0,0)));

    DRAWTEXT_FIX(CURRBARSCOUNT=1,0.015,1,0,'主力进出'),COLORMAGENTA;

    DRAWTEXT_FIX(CURRBARSCOUNT=1,0.107,1,0,'散户进出'),COLORCYAN;

image.png

cci变色指标公式

    STICKLINE(C>0,100,100,1,0),COLORBLUE;

    STICKLINE(C>0,50,50,1,0),COLORMAGENTA;

    STICKLINE(C>0,0,0,3,0),COLORYELLOW;

    STICKLINE(C>0,-50,-50,1,0),COLORFF0080;

    STICKLINE(C>0,-100,-100,1,0),COLOR00BB00;

    BC:=((H*0.5+L*0.5)*0.382+(O*0.382+C*0.618)*0.618);

    LJ:=IF(INDEXC=C,BC,(BC+AMOUNT/(V*100))/2);

    H18:=EMA(HHV(LJ,(18*0.691)),3);

    L18:=EMA(LLV(LJ,18*1.309),3);

    H25:=EMA(HHV(LJ,(25*0.691)),3);

    L25:=EMA(LLV(LJ,25*1.309),3);

    H48:=EMA(HHV(LJ,48*0.691),3);

    L48:=EMA(LLV(LJ,48*1.309),3);

    H75:=EMA(HHV(LJ,75*0.691),3);

    L75:=EMA(LLV(LJ,75*1.309),3);

    H123:=EMA(HHV(LJ,123*0.691),3);

    L123:=EMA(LLV(LJ,123*1.309),3);

    HH:=(H18+H25+H48+H75+H123)/5;

    LL:=(L18+L25+L48+L75+L123)/5;

    生

    命:=((MA(LJ,18)+MA(LJ,25)+MA(LJ,48)+MA(LJ,75)+MA(LJ,123))/5+HH+LL)/

    3;

    上轨:=生命+((STD(LJ,48*0.691)+STD(LJ,48)+STD(LJ,48*1.309))/3);

    多:(LJ-上轨)/(0.03*AVEDEV(LJ,N)),COLORWHITE;

    辅助线:EMA(多,3),COLORGREEN;

    IF(多<-50,多,DRAWNULL),COLORGRAY;

    IF(多>0,多,DRAWNULL),COLORRED;

    空:-(LJ-MA(LJ,N))/(0.03*AVEDEV(LJ,N)),COLORAAAA00;

image.png

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。