以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 交易时间限制问题 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=153857) |
-- 作者:zengxing -- 发布时间:2017/5/22 16:09:00 -- 交易时间限制问题 如何编写 交易时间是从 21:10 -23:20 9:10-11:20 13:40-14:50 到了时间要全平
|
-- 作者:gzj137070928 -- 发布时间:2017/5/22 16:18:55 -- cond1:=time>=211000 and time<=232000; cond2:=time>=091000 and time<=112000; cond3:=time>=134000 and time<=145000; cond:=cond1 or cond2 or cond3; if not(cond) then sell(1,0,marketr)/sellshort(1,0,marketr);//市价平仓
|
-- 作者:wenarm -- 发布时间:2017/5/22 16:44:04 -- 软件默认是今天时间,你上面提供的是北京时间。如果是金字塔时区请将北京时间时间+4小时 cond1:=time>=211000 and time<=232000; cond2:=time>=091000 and time<=112000;
cond3:=time>=134000 and time<=145000;
if cond1 or cond2 or cond3 then begin
sell();
sellshort();
end
[此贴子已经被作者于2017/5/22 16:46:17编辑过]
|
-- 作者:gzj137070928 -- 发布时间:2017/5/23 10:32:46 -- 对的,忘记了软件自己的金字塔时间 ![]() |