设为首页加入收藏

微信关注
官方微信号:71712643
加关注获取每日精选资讯
股票入门欢迎您加入
广告服务联系我们网站地图

飞狐副图公式源码 飞狐股票箱副图公式源码

2014-11-12 13:12:01 股票入门 http://rumen.southmoney.com

  南方财富网带来飞狐副图公式源码 飞狐股票箱副图公式源码:

  股票箱 副图源码

  fh:=high;

  fl:=low;

  sell:=0*fh;

  buy:=sell;

  signal:=sell;

  boxh:sell,linethick0;

  boxl:sell,linethick0;

  variable:hc=0,lc=0,bt=fh[1],bb=fh[1];

  for i=1 to datacount do begin

  if hc》1 then begin

  if lc》2 and bt《=fh[i] then begin

  buy[i]:=1;

  for j=i-1 downto i-hc do begin

  boxh[j]:=fh[i-hc];

  boxl[j]:=fl[i-lc];

  end;

  hc:=0;lc:=0;

  end;

  if bt》fh[i] then begin

  if lc》2 then begin

  if bb》=fl[i] then begin

  sell[i]:=1;

  for j=i-1 downto i-hc do begin

  boxh[j]:=fh[i-hc];

  boxl[j]:=fl[i-lc];

  end;

  hc:=-1;lc:=0;

  end else begin

  boxh[i]:=fh[i-hc];

  boxl[i]:=fl[i-lc];

  end;

  end;

  hc:=hc+1;

  if lc》1 then begin

  if bb《fl[i] then begin

  lc:=lc+1;

  if lc=3 then begin

  signal[i-hc+1]:=1;

  for j=i downto i-hc+1 do begin

  boxh[j]:=fh[i-hc+1];

  boxl[j]:=fl[i-lc+1];

  end;

  end;

  end else lc:=0;

  end else

  if lc=1 then begin

  if bb《fl[i] then begin

  lc:=lc+1;

  end else lc:=0;

  end;

  if lc=0 and hc》1 then begin

  bb:=fl[i];

  lc:=lc+1;

  end;

  end else begin hc:=0; lc:=0; end;

  end else

  if hc=1 then begin

  if bt》fh[i] then

  hc:=hc+1

  else begin hc:=0;lc:=0; end;

  end;

  if hc=0 then begin

  bt:=fh[i];

  hc:=hc+1;

  end;

  end;

  partline(boxh and boxh=ref(boxh,1),boxh),coloryellow,pointdot;

  partline(boxl and boxl=ref(boxl,1),boxl),coloryellow,pointdot;

  stickline((signal||refx(buy||sell,1))&&boxh,boxh,boxl,0.1,0),pointdot,coloryellow;

  drawicon(buy,low*0.98,4);

  drawicon(sell,high*1.02,5);

股票入门声明:资讯来源于互联网,属作者个人观点,仅供投资者参考,并不构成投资建议。投资者据此操作,风险自担。