以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://222.73.7.161/bbs/index.asp)
--  金字塔软件问题提交  (http://222.73.7.161/bbs/list.asp?boardid=2)
----  求等价K线源码谢谢  (http://222.73.7.161/bbs/dispbbs.asp?boardid=2&id=30792)

--  作者:cq2698
--  发布时间:2012/11/21 12:42:22
--  求等价K线源码谢谢
求等价K线源码谢谢
--  作者:lichenghu
--  发布时间:2012/11/21 12:57:03
--  
您好,这个要求实现不了
[此贴子已经被作者于2012-11-21 12:57:30编辑过]

--  作者:888SUN
--  发布时间:2012/11/30 22:55:00
--  是这个吗
INPUT:N(5,1,100);
fc:=c;fo:=o;cc:0*c,PRECISION4,LINETHICK0;oo:0*c,PRECISION4,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/1000) then begin
cc[i]:=cc[i-1]*(1+n/1000);
oo[i]:=cc[i-1];
end;
if i>1 and fc[i]<oo[i]/(1+n/1000) then begin
oo[i]:=oo[i-1]/(1+n/1000);
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);
格子点数:abs(cc-oo),PRECISION4,linethick0;
STICKLINE(c1=oo,ref(cc,1),ref(oo,1),1,1),COLORRED;
STICKLINE(c1=oo,cc,oo,8,0),COLORRED;
STICKLINE(o1=cc,ref(cc,1),ref(oo,1),1,1),COLORFF00;
STICKLINE(o1=cc,cc,oo,8,0),COLORFF00;