Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[原创]历史测试和实时交易收盘平仓

1楼
z7c9 发表于:2011/8/17 21:32:30
if date<refx(date,1) then begin
 sell(1,holding,limitr,close);
 sellshort(1,holding,limitr,close);
end else begin
 if(date=currentdate and time=145500 and currenttime>=145900) begin
  sell(1,holding,limitr,close);
  sellshort(1,holding,limitr,close);
 end 
end
2楼
readonly 发表于:2012/5/10 7:59:22

好像上半段程序已经可以完成收盘平仓啦,请问下半截程序的用途是什么?

 

end else begin
if(date=currentdate and time=145500 and currenttime>=145900) begin
sell(1,holding,limitr,close);
sellshort(1,holding,limitr,close);
end
end

3楼
rushtaotao 发表于:2012/5/10 9:01:04

上半段和下半段是条件不一样吧

上半段满足此条件平仓if date<refx(date,1)

下半段满足此条件平仓if(date=currentdate and time=145500 and currenttime>=145900)

时间的限制有区别,一个平历史,一个平当前的

 

共3 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.02734 s, 3 queries.