九毛八公式指标
公式模块:
请编写突破音叉顶部的选股公式,谢谢老师!!!!!!!!!!!
input: N(5,1,100);
z:zig(4,N);a:=FLATZIG(4,N);q:=datacount; aa:=if(ISLASTBAR,0,a=1 or a=0);
w:barslast(aa),LINETHICK;s:=sum(aa,0);ss:=s[q]-s+1;ba:=barpos;
K:=if(ss<4,4,ss[SYSPARAM(1)]);
xx0:=ref(ba,barssince(ss=K));
xx1:=ref(ba,barssince(ss=K-1));
xx2:=ref(ba,barssince(ss=K-2));
x0:=xx0[q];x1:=xx1[q];x2:=xx2[q];
y0:=z[x0];y1:=z[x1];y2:=z[x2];
x:=(x1+x2)/2;y:=(y1+y2)/2;xL:=(y-y0)/(x-x0);
DRAWSL(ba=x0,z,xL,0,0),COLORMAGENTA,LINEDOT;
DRAWSL(ba=x1,z,xL,0,0),COLORGREEN,LINEDOT;
DRAWSL(ba=x2,z,xL,0,0),COLORGREEN,LINEDOT;
DRAWLINE(ba=x1,z,ba=x2,z,0),COLORGREEN,LINETHICK2;
中:LINEVALUE(ba=x0,z,ba=x0+1,y0+xL,0,0),COLORMAGENTA;
下:LINEVALUE(ba=x1,z,ba=x1+1,y1+xL,0,0),COLORGREEN;
上:LINEVALUE(ba=x2,z,ba=x2+1,y2+xL,0,0),COLORGREEN;
斜率:xL,LINETHICK;
角度:ATAN(xL)*114.6,LINETHICK;
中1:=LINEVALUE(ba=x0,z,ba=x0+1,y0+xL,1,0),COLORMAGENTA;
中0:=if(ba>x1,中,中1);
M1:=LINEVALUE(ba=x1,z,ba=x2,z,0,0);
M2:=LINEVALUE(ba=x1,z,ba=x2,z,1,0);
M:=if(ba>x,m1,m2);
u:=中0-if(y2>y1,下,上);
t0:=中0-u[q]*0.5,LINETHICK,Color005500;
t1:=中0-u[q]*1.5,LINETHICK,Color005500;
t2:=中0-u[q]*2,LINETHICK,Color005500;
wt0:=barssince(cross(t0,m) or cross(m,t0))*0;
wt1:=barssince(cross(t1,m) or cross(m,t1))*0;
wt2:=barssince(cross(t2,m) or cross(m,t2))*0;
t0+wt0,LINEDASHDOT,Color005500;
t1+wt1,LINEDASHDOT,Color005500;
t2+wt2,LINEDASHDOT,Color005500;
u0:=中0+u[q]*0.5,LINETHICK,Color005500;
u1:=中0+u[q]*1.5,LINETHICK,Color005500;
u2:=中0+u[q]*2,LINETHICK,Color005500;
wu0:=barssince(cross(u0,m) or cross(m,u0))*0;
wu1:=barssince(cross(u1,m) or cross(m,u1))*0;
wu2:=barssince(cross(u2,m) or cross(m,u2))*0;
u0+wu0,LINEDASHDOT,Color005500;
u1+wu1,LINEDASHDOT,Color005500;
u2+wu2,LINEDASHDOT,Color005500;
PARTLINE(BETWEEN(m,u2,t2),m),LINETHICK,Color005500;
请编写突破音叉顶部线的选股公式. 你这个不好整的了,没有光标定位,值都不确定乍选股哦。定光标是要人为选点确定的,不是所有任意位置都行的哦。