以文本方式查看主题

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

--  作者:系统使用者
--  发布时间:2017/1/10 12:03:13
--  请帮忙交易编写问题
//开多条件
隔夜开多:KD01>0;
a2:=(KD02+KD03)>0;
//开空条件
隔夜开空:KK01>0;
b2:=(KK02+KK03)>0;

//交易系统
开多: if todaybar=1 then buy(a2 and HOLDING=0,ss,limitr,open+MINDIFF);
开空: if todaybar=1 then buyshort(b2 and HOLDING=0,ss,limitr,open-MINDIFF);
//日内平仓
if time>=closetime(0)-5*100 then begin
 平多:sell(1,ss,market);
 平空:sellshort(1,ss,market);
end
上面完成了日内开平仓;
下面是隔夜问题:
1)隔夜开多开空,要求收盘最后1-2分时间开多开空,次日开盘平仓,又应如何编写?


--  作者:wenarm
--  发布时间:2017/1/10 12:46:05
--  

日线级别提前1分钟下单时间条件。

timetot0(dynainfo(207))<(timetot0(closetime(0))-60);