以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  1分钟图中,  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=76289)

--  作者:崔战营
--  发布时间:2015/3/9 12:45:16
--  1分钟图中,

1分钟图中,中午收盘前10分钟和下午收盘前10分钟平仓,且停止开仓,怎么编写?多谢!!!!!!!!!!!


--  作者:qq代人发帖
--  发布时间:2015/3/9 13:20:49
--  

根据具体品种写时间例如股指的中午11:30收盘,下午15:15收盘

if time>=112000 and time<130000 then begin
sell(holding>0,holding,market);
sellshort(holding<0,holding,market);
end
if time>150500 then begin
sell(holding>0,holding,market);
sellshort(holding<0,holding,market);
end

开仓条件里加上(time>090000 and time<112000) or (time>130000 and time<150500)