以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  此代码在金字塔无显示,能帮看看什么原因吗?  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=1608)

--  作者:vivaxie
--  发布时间:2010/5/9 20:34:42
--  此代码在金字塔无显示,能帮看看什么原因吗?
INPUT:N(1,1,100);
fc:=c;fo:=o;cc:0*c,LINETHICK0;oo:0*c,LINETHICK0;t1:=0*c;t2:=0*c;
for i=1 to datacount do begin
  if i=1 and fc[i]>fo[i] then
    cc[i]:=fc[i];
    oo[i]:=fc[i];
  if i=1 and fc[i]<fo[i] then
    cc[i]:=fc[i];
    oo[i]:=fc[i];
  if i>1 then
    cc[i]:=cc[i-1];
    oo[i]:=oo[i-1];
  if i>1 and fc[i]>cc[i]*(1+n/100) then begin
    cc[i]:=cc[i-1]*(1+n/100);
    oo[i]:=cc[i-1];
end;
  if i>1 and fc[i]<oo[i]/(1+n/100) then begin
    oo[i]:=oo[i-1]/(1+n/100);
    cc[i]:=oo[i-1];
end;
  if oo[i]=oo[i-1] then
     t1[i]:=t1[i-1]+1;
  if cc[i]=cc[i-1] then
     t2[i]:=t2[i-1]+1;
end;
o1:=ref(oo,t1+1);
c1:=ref(cc,t2+1);
STICKLINE(c1=oo,cc,oo,8,1)COLORRED;
STICKLINE(o1=cc,cc,oo,8,1)COLORCYAN;

--  作者:admin
--  发布时间:2010/5/9 20:49:34
--  [建议]管它是否采纳,为金字塔好还是提出来试试

此公式无法转换金字塔,请等待日后升级版