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

    正文概述    2024-04-13 08:26:12  

    超短线源码

    TS:=130;
    N:=99;
    M:=3;
    MT:=3;
    M1:=5;
    M2:=7;
    M3:=21;
    M4:=12;
    M5:=50;
    DA1:=IF(TS TOTALBARSCOUNT,TOTALBARSCOUNT,TS);
    DA:=IF(CURRBARSCOUNT DA1,0,DA1);
    HI:=REFDATE(HHV(H,DA),DATE);
    LO:=REFDATE(LLV(L,DA),DATE);
    C1:=IF(CURRBARSCOUNT =DA,C,DRAWNULL);
    GZ:=EXP(LN(HI/LO)/10);
    LH1:=SUM(IF(C1 =(HI/GZ),V,0),DA);
    LH2:=SUM(IF(C1 =(HI/POW(GZ,2)) AND C1 (HI/GZ),V,0),DA);
    LH3:=SUM(IF(C1 =(HI/POW(GZ,3)) AND C1 (HI/POW(GZ,2)),V,0),DA);
    LH4:=SUM(IF(C1 =(HI/POW(GZ,4)) AND C1 (HI/POW(GZ,3)),V,0),DA);
    LH5:=SUM(IF(C1 =(HI/POW(GZ,5)) AND C1 (HI/POW(GZ,4)),V,0),DA);
    LH6:=SUM(IF(C1 =(HI/POW(GZ,6)) AND C1 (HI/POW(GZ,5)),V,0),DA);
    LH7:=SUM(IF(C1 =(HI/POW(GZ,7)) AND C1 (HI/POW(GZ,6)),V,0),DA);
    LH8:=SUM(IF(C1 =(HI/POW(GZ,8)) AND C1 (HI/POW(GZ,7)),V,0),DA);
    LH9:=SUM(IF(C1 =(LO*GZ) AND C1 LO*POW(GZ,2),V,0),DA);
    LH10:=SUM(IF(C1 =LO AND C1 LO*GZ,V,0),DA);
    L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0;
    L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0;
    L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0;
    L4:=REFDATE(HHV(LH4,DA),DATE);
    L5:=REFDATE(HHV(LH5,DA),DATE);
    L6:=REFDATE(HHV(LH6,DA),DATE);
    L7:=REFDATE(HHV(LH7,DA),DATE);
    L8:=REFDATE(HHV(LH8,DA),DATE);
    L9:=REFDATE(HHV(LH9,DA),DATE);
    L10:=REFDATE(HHV(LH10,DA),DATE);
    SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);

    STICKLINE(CEILING(DA*L1/SS)*3 =CURRBARSCOUNT,HI*N/100,(HI/GZ),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L2/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,1)*N/100,HI/POW(GZ,2),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L3/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,2)*N/100,HI/POW(GZ,3),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L4/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,3)*N/100,HI/POW(GZ,4),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L5/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,4)*N/100,HI/POW(GZ,5),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L6/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,5)*N/100,HI/POW(GZ,6),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L7/SS)*3 =CURRBARSCOUNT,HI/POW(GZ,6)*N/100,HI/POW(GZ,7),1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L8/SS)*3 =CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*N/100,1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L9/SS)*3 =CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*N/100,1,1),COLOR454545,LINETHICK1;
    STICKLINE(CEILING(DA*L10/SS)*3 =CURRBARSCOUNT,LO,LO*POW(GZ,1)*N/100,1,1),COLOR454545,LINETHICK1;
    DRAWKLINE(H,O,L,C);JJ:=(CLOSE+HIGH+LOW)/3;
    DRAWBAND(MA(C,2),RGB(250,125,50),MA(C,7),RGB(0,150,250));
    今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLOR8080FF,NODRAW;

    AA05:MA(C,3),LINETHICK3,COLOR00CCFF;
    五日乖离率:=(C-AA05)/AA05*100;
    BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;
    速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);
    加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;
    IF(BB05 30 AND AA05 REF(AA05,1), AA05,DRAWNULL),LINETHICK6,COLOR5959FF;
    AA10:MA(C,10),COLOR4080FF;AA20:=MA(C,20);
    BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;
    IF(BB05 0 AND AA05 REF(AA05,1), AA05,DRAWNULL),LINETHICK3,COLORGREEN;
    AA30:MA(C,30),COLOR515100,LINETHICK3;
    三拾日乖离率:(C-AA30)/AA30*100,NODRAW;
    VAR111:=(AA20-AA30) REF((AA20-AA30),1) AND AA20 REF(AA20,1) AND AA30 REF(AA30,1);
    VAR122:=(AA30-AA20) REF((AA30-AA20),1) AND AA20 REF(AA20,1) AND AA30 REF(AA30,1);
    BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;
    IF(BB30 15 AND AA30 REF(AA30,1), AA30,DRAWNULL),LINETHICK3,COLORFF00FF;
    强势狙击:=FILTER(BB30 30 AND BB10 45 AND CROSS(BB05,60),10);
    加仓:=FILTER(COUNT(CROSS(BB05,30),5) =1 AND AA05 REF(AA05,1) AND 三拾日乖离率 REF(三拾日乖离率,1) AND AA10 REF(AA10,1)
    AND 加速度5 REF(加速度5,1) AND 速度5 REF(速度5,1) ,10) ;
    清仓:=FILTER(COUNT(CROSS(30,BB05),5) =1 AND (C AA30 OR O AA30) AND AA05 REF(AA05,1) AND 三拾日乖离率 REF(三拾日乖离率,1) AND AA10 REF(AA10,1),10);
    DRAWTEXT(加仓 ,LOW*0.96,'加仓'),COLORFFFFFF;
    JC:=CROSS(0,五日乖离率) AND 三拾日乖离率 REF(三拾日乖离率,1) AND AA10 REF(AA10,1) ;
    减仓:=FILTER(JC,10);
    MR:=COUNT(CROSS(五日乖离率,0),3) =1 AND 三拾日乖离率 REF(三拾日乖离率,1) AND AA05 REF(AA05,1) AND (C/REF(C,1)-1)*100 5 AND REF(C,1) AA30;
    买入:=FILTER(MR,10);
    DRAWTEXT(减仓,HIGH*1.02,'减仓'),COLORCYAN;
    DRAWTEXT(买入,LOW*0.98,'买'),COLORFFFFFF;
    DRAWTEXT(清仓 ,HIGH*1.02,'清仓'),COLORGREEN;
    DRAWTEXT(强势狙击,LOW*0.98,'强势狙击'),COLORYELLOW;
    VAR1:=CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2);
    VAR2:=REF(VAR1,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR3:=REF(VAR2,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR4:=REF(VAR3,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR5:=REF(VAR4,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR6:=REF(VAR5,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR7:=REF(VAR6,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR8:=REF(VAR7,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR9:=REF(VAR8,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VARA:=REF(VAR9,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VARB:=REF(VARA,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VARC:=REF(VARB,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VARD:=CLOSE REF(CLOSE,1) AND CLOSE REF(CLOSE,2);VARE:=REF(VARD,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VARF:=REF(VARE,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR10:=REF(VARF,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR11:=REF(VAR10,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR12:=REF(VAR11,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR13:=REF(VAR12,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR14:=REF(VAR13,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR15:=REF(VAR14,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR16:=REF(VAR15,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR17:=REF(VAR16,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR18:=REF(VAR17,1) AND CLOSE =REF(CLOSE,1) AND CLOSE =REF(CLOSE,2);
    VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR
    VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;
    VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR
    VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;
    DRAWICON(VAR19,REF(CLOSE,1)*0.98,34);
    DRAWICON(VAR1A,REF(CLOSE,1)*1.02,35);

    DRAWKLINE(H,O,L,C);
    ZKP:=IF(C REF(C,1),REF(C,1),DRAWNULL);
    ZSP:=IF(C REF(C,1),C,DRAWNULL);
    DKP:=IF(C =REF(C,1),REF(C,1),DRAWNULL);
    DSP:=IF(C =REF(C,1),C,DRAWNULL);
    DRAWKLINE(H,DKP,L,DSP);
    STICKLINE(C =REF(C,1),DKP,DSP,3.05,0),COLORBLUE;
    STICKLINE(C =REF(C,1),DKP,DSP,2.2,0),COLORFF7700;
    STICKLINE(C =REF(C,1),DKP,DSP,1.5,0),COLORFF9900;
    STICKLINE(C =REF(C,1),DKP,DSP,0.5,0),COLORFFBB00;
    DRAWKLINE(H,ZKP,L,ZSP);
    STICKLINE(C REF(C,1),ZKP,ZSP,3.05,0),COLOR000099;
    STICKLINE(C REF(C,1),ZKP,ZSP,2.2,0),COLOR0000CC;
    STICKLINE(C REF(C,1),ZKP,ZSP,1.5,0),COLOR0000FF;
    STICKLINE(C REF(C,1),ZKP,ZSP,0.5,0),COLORCC66FF;
    STICKLINE(V/REF(V,1) 2 AND CLOSE =OPEN,ZKP,ZSP,1,0),COLORYELLOW;


    超短线源码

    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 超短线源码 加入收藏