以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 请教老师:如何限定每天只开、平一次 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=99357) |
-- 作者:我心飞翔 -- 发布时间:2016/6/21 10:49:50 -- 请教老师:如何限定每天只开、平一次 请教老师:如何限定每天只开、平一次,在策略里加 TOTALDAYTRADE<=1语句好像不起作用。 |
-- 作者:jinzhe -- 发布时间:2016/6/21 10:56:44 -- 这个要用全局变量的 variable:bj=0;
if 开多条件 and holding=0 and bj=0 then begin buy(1,1,marketr); bj:=1; end
if holding>0 and bj=1 and 平多条件 then begin sell(1,0,marketr); end
if time=closetime(0) then bj:=0; |
-- 作者:我心飞翔 -- 发布时间:2016/6/21 10:58:27 -- 这么复杂 |