以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://weistock.com/bbs/list.asp?boardid=2)
----  [原创]  (http://weistock.com/bbs/dispbbs.asp?boardid=2&id=11045)

--  作者:lizhaozhao
--  发布时间:2012/4/12 15:08:17
--  [原创]

GLOBALVARIABLE:opjg=close ;
GLOBALVARIABLE:jzjg=close ;

if tbuyholding(1)<>0  and tsellholding(1)<>0  then begin

if time<closetime(0) then begin

if abs(close-jzjg)<5  then begin

if close-opjg>=1 then begin
opjg:=close;
tbuy(1,2,mkt);
tsellshort(1,2,mkt);
end

if opjg-close>=1 then begin
opjg:=close;
tsell(1,2,mkt);
tbuyshort(1,2,mkt);
end

end


if close-jzjg>=5  then begin
tsell(1,8,mkt);
tbuyshort(1,8,mkt);
jzjg:=close;
TCANCEL(1,0);
end

if jzjg-close>=5 then begin
tbuy(1,8,mkt);
tsellshort(1,8,mkt);
jzjg:=close;
TCANCEL(1,0);
end

end

if time>=closetime(0) then begin
dctz:=tbuyholding(1)-10;

if dctz>0 then begin
tsell(1,dctz,mkt);
tbuyshort(1,dctz,mkt);
end

if dctz<0 then begin
tbuy(1,abs(dctz),mkt);
tsellshort(1,abs(dctz),mkt);
end
TCANCEL(1,0);

end

end

 

这个后台交易的代码 每次启动预警时 总是说“数据量过大,计算溢出”,然后软件就自动关闭了,请教大侠 是什么原因啊?


--  作者:董小球
--  发布时间:2012/4/12 15:30:14
--  
楼主你写的是后台代码,记得不要运行在图表上
另外能吧你的情况截图来看看么