以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://weistock.com/bbs/list.asp?boardid=4)
----  今日开盘价代码和收盘清仓代码怎么写  (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=78806)

--  作者:qq代人发帖
--  发布时间:2015/5/20 13:53:15
--  今日开盘价代码和收盘清仓代码怎么写
请问今日开盘价代码和收盘清仓代码怎么写

--  作者:pyd
--  发布时间:2015/5/20 13:59:13
--  

oo:VALUEWHEN(TODAYBAR=1,0);//开盘价

 

//收盘前5分钟平仓
m5:=(t0totime(timetot0(closetime(0))-60*5));
if time>=m5  then begin
Sell(holding>0,1,market);
sellshort(holding<0,holding,market);
end

[此贴子已经被作者于2015/5/20 14:00:32编辑过]