最新公告
  • 欢迎您光临九毛八公式指标网www.9m8.cn,本站全新改版试运行,期间内容全部免费,欢迎下载!欢迎加入本站VIP
  • 自用指标“顶底抛物线”

    正文概述    2024-04-08 00:27:00  
    drawtext(sysparam(2)=barpos,c,'板块:'+blkname),colorccffff,align4;
    dd:= xh-z.dd
    gg:= xh-z.gg
    sd:=sum(dd,0);
    p:=SYSPARAM(1);
    q:=SYSPARAM(3);
    sdd:=sd[p]-sd+1;
    wx0:=barssince(sdd=4);
    wx1:=barssince(sdd=3);
    wx2:=barssince(sdd=2);
    wx3:=barssince(sdd=1);
    rx2:=hhv((wx2=0)*wx1,0);X2:=rx2[p];
    rx3:=hhv((wx3=0)*wx1,0);X3:=rx3[p];
    ry1:=hhv((wx1=0)*L,0);Y1:=ry1[p];
    ry2:=hhv((wx2=0)*L,0);Y2:=ry2[p]-y1;
    ry3:=hhv((wx3=0)*L,0);Y3:=ry3[p]-y1;
    XS:=POW(X3,0.5);XE:=POW(X2,0.5);
    K:=(XS*Y2-XE*Y3)/(XS*X2-XE*X3);
    d:=POW(Y2-K*X2,2)/X2;
    YY1:=POW(D*WX1,0.5)+K*WX1;
    R1:=Y1-REF(YY1,WX1);
    YY:=(YY1+R1);
    YY2:=-POW(D*WX1,0.5)+K*WX1;
    R2:=Y1-REF(YY2,WX1);
    YE:=(YY2+R2);
    wyy:=abs(ref(yy,wx3)-ref(L,wx3)) 0.01;
    wye:=abs(ref(ye,wx3)-ref(L,wx3)) 0.01;
    if wyy[p] then
    低:yy,LINETHICK2,COLORMAGENTA;
    ELSE
    低1:ye,LINETHICK2,COLORMAGENTA;
    sg:=sum(gg,0);
    sgg:=sg[p]-sg+1;
    wxg0:=barssince(sgg=4);
    wxg1:=barssince(sgg=3);
    wxg2:=barssince(sgg=2);
    wxg3:=barssince(sgg=1);
    rxg2:=hhv((wxg2=0)*wxg1,0);Xg2:=rxg2[p];
    rxg3:=hhv((wxg3=0)*wxg1,0);Xg3:=rxg3[p];
    ryg1:=hhv((wxg1=0)*h,0);Yg1:=ryg1[p];
    ryg2:=hhv((wxg2=0)*h,0);Yg2:=ryg2[p]-yg1;
    ryg3:=hhv((wxg3=0)*h,0);Yg3:=ryg3[p]-yg1;
    XSg:=POW(Xg3,0.5);XEg:=POW(Xg2,0.5);
    Kg:=(XSg*Yg2-XEg*Yg3)/(XSg*Xg2-XEg*Xg3);
    g:=POW(Yg2-Kg*Xg2,2)/Xg2;
    YYg1:=POW(g*WXg1,0.5)+Kg*WXg1;
    Rg1:=Yg1-REF(YYg1,WXg1);
    YYg:=(YYg1+Rg1);
    YYg2:=-POW(g*WXg1,0.5)+Kg*WXg1;
    Rg2:=Yg1-REF(YYg2,WXg1);
    YEg:=(YYg2+Rg2);
    wyyg:=abs(ref(yyg,wxg3)-ref(h,wxg3)) 0.01;
    wyeg:=abs(ref(yeg,wxg3)-ref(h,wxg3)) 0.01;
    if wyyg[p] then
    高:yyg,LINETHICK2,Color89FF50;
    ELSE
    高1:yeg,LINETHICK2,Color89FF50;
    DRAWICON(wx0 =0 and (dd or gg),dd*L+gg*h,12);
    DRAWICON(wx3=0 or wxg3=0,dd*L+gg*h,10);
    tt:='高n n'+NUMTOSTR(if(wyyg[p],yyg[q],yeg),3)+'n n n n 低n
    n'+NUMTOSTR(if(wyy[p],yy[q],ye[q]),3);
    DRAWTEXT(BARPOS=q-5,h,tt)SHIFT1,ALIGN4;
    Var1:=ZIG(3,10) REF(ZIG(3,10),1) AND REF(ZIG(3,10),1) REF(ZIG(3,10),2);
    {ZIG 有未来}
    Var2:=ZIG(3,10) REF(ZIG(3,10),1) AND REF(ZIG(3,10),1) REF(ZIG(3,10),2);
    STICKLINE(Var1,C,O,8,0),COLORYELLOW,LINETHICK2;{高位黄色}
    STICKLINE(Var1,C,O,3,0),COLORYELLOW,LINETHICK2;{高位黄色}
    STICKLINE(Var1,H,L,1,0),COLORYELLOW,LINETHICK2;{高位黄色}
    STICKLINE(Var2,C,O,8,0),COLORFF00FF,LINETHICK2;{底位红色}
    STICKLINE(Var2,C,O,3,0),COLORFF00FF,LINETHICK2;{底位红色}
    STICKLINE(Var2,H,L,1,0),COLORFF00FF,LINETHICK2;{底位红色}


    九毛八公式指标,一个优质的公式指标平台!
    九毛八公式指标 » 自用指标“顶底抛物线” 加入收藏