以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  金字塔软件问题提交  (http://weistock.com/bbs/list.asp?boardid=2)
----  开仓后第三天收盘时清仓  (http://weistock.com/bbs/dispbbs.asp?boardid=2&id=55298)

--  作者:uime
--  发布时间:2013/8/17 17:00:27
--  开仓后第三天收盘时清仓
在日线周期中,开仓后,第三天收盘时清仓,如何写代码?
--  作者:jinzhe
--  发布时间:2013/8/19 9:31:28
--  

variable:n=0;

if 开仓条件 and 持仓判断 then begin

   下单语句;

   n:=date;

end

 

if date=n+2 and not(islastbar) or  (date=n+2 and islastbar and dynainf(207)>145900) then begin

   平仓语句;

   n:=0;

end