运动曲线---是试图寻找股价运动轨迹,以此来寻找股价运行规律INPUT:N(10,1,100); fc:=c;fo:=o;x:=0*c;t1:=0*c; for i=1 to datacount do begin if i=1 and fc[i]>=fo[i] then x[i]:=fc[i]; if i=1 and fc[i]<=fo[i] then x[i]:=fc[i]; if i>1 then x[i]:=x[i-1]; if i>1 and fc[i]>x[i-1]*(1+n/100) then x[i]:=x[i-1]*(1+n/100); if i>1 and fc[i]<x[i-1]/(1+n/100) then x[i]:=x[i-1]/(1+n/100); if x[i]=x[i-1] then t1[i]:=t1[i-1]+1; end; cc:x,LINETHICK0; x1:=ref(x,t1+1); x2:=ref(x1,t1+1); y:=BARSSINCE(x>ref(x,1))+1; y1:=BARSSINCE(x<ref(x,1))+1; k1:=BARSLAST(cross(x>x2,0.5)or y1=1); d1:=BARSLAST(cross(x<x2,0.5)or y=1); PARTLINE(d1>k1,x)COLORRED; PARTLINE(d1<k1,x)COLORCYAN; ks:=BARPOS; ks1:=BARSSINCE(cross(x<x2,0.5) or cross(x>x2,0.5)); fk:=ks-ks1; xk:=0*c; b:=fk[datacount]; for i=b to DATACOUNT do begin if fk[i]>1 then xk[i]:=xk[i-1]+1; else xk[i]:=xk[i-1]+2; end tj:=if(xk<1,1,0); PARTLINE(tj=1 and y>=1,x),COLORFF00FF; PARTLINE(tj=1 and y1>=1,x),COLOR00FF00;{点击看本软件截图: 58股票 公式网 http://www. 58gu. com 整理} |