编写要求:
解答:
?网友求助:
请编写突破音叉顶部的选股公式,谢谢老师!!!!!!!!!!!
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;
请编写突破音叉顶部线的选股公式.
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!