以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  周一至四收盘前3分钟平掉一半仓位,周五则是全部平掉  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=61724)

--  作者:gz12345678gz
--  发布时间:2014/2/17 15:37:44
--  周一至四收盘前3分钟平掉一半仓位,周五则是全部平掉
这种该如何编写,谢谢
--  作者:jinzhe
--  发布时间:2014/2/17 15:55:25
--  

if weekday<=4 and time0<=timetot0(closetime(0))-180 then begin

   sell(1,holding/2,market);

   sellshort(1,holding/2,market);

end

 

if weekday=4 and time0<=timetot0(closetime(0))-180 then begin

   sell(1,0,market);

   sellshort(1,0,market);

end