以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 我想半个小时只做一次操作。 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=60814) |
-- 作者:qq代人发帖 -- 发布时间:2014/1/9 15:26:51 -- 我想半个小时只做一次操作。 平空:SELLSHORT(开多平空条件 and holding<0,手数,MARKET); 我要怎么改?比如说我现在买多,半个小时后才能平多和买空,再半个小时才能平空和买多,1分钟周期。 |
-- 作者:jinzhe -- 发布时间:2014/1/9 15:31:39 -- variable:n=0; if n=0 and holding=0 and 开多平空条件 then begin buy........; n:=1; end if n=0 and holding=0 and 开空平多条件 then begin buyshort.....; n:=1; end
if n=1 and 开多平空条件 and enterbars>30 then sellshort..........; if n=1 and 开多平空条件 and exitbars>30 then buy..........; if n=1 and 开空平多条件 and enterbars>30 then sell..........; if n=1 and 开空平多条件 and exitbars>30 then buyshort..........;
|
-- 作者:crystal731 -- 发布时间:2014/1/9 15:47:15 -- 开多用的buy,开空不是要用sell吗?为什么要用buyshort? |
-- 作者:crystal731 -- 发布时间:2014/1/9 15:48:31 -- 不用回了,我知道了 |
-- 作者:crystal731 -- 发布时间:2014/1/9 15:57:13 -- variable:i=0; if i=0 and holding=0 and 开多平空条件 then begin BUY(开多平空条件 and holding=0,手数,MARKET); i:=1; end if i=0 and holding=0 and 开空平多条件 then begin BUYSHORT(开空平多条件 and holding=0,手数,MARKET); i:=1; end if i=1 and 开多平空条件 and enterbars>30 then SELLSHORT(开多平空条件 and holding<0,手数,MARKET); if i=1 and 开多平空条件 and exitbars>30 then BUY(开多平空条件 and holding=0,手数,MARKET); if i=1 and 开空平多条件 and enterbars>30 then SELL(开空平多条件 and holding>0,手数,MARKET); if i=1 and 开空平多条件 and exitbars>30 then BUYSHORT(开空平多条件 and holding=0,手数,MARKET); 我用了这个,结果测试的时候一次开仓都没有
|
-- 作者:jinzhe -- 发布时间:2014/1/9 16:00:05 -- k线图上有信号没 |
-- 作者:crystal731 -- 发布时间:2014/1/9 16:00:49 -- 有信号 |
-- 作者:jinzhe -- 发布时间:2014/1/9 16:03:35 -- http://www.weistock.com/bbs/dispbbs.asp?boardid=16&Id=57075 问题12和21 |
-- 作者:crystal731 -- 发布时间:2014/1/9 16:13:16 -- 都看过了,按照上面的都看过了,还是没开仓 |
-- 作者:jinzhe -- 发布时间:2014/1/9 16:17:34 -- 再仔细检查一下,一般是没补数据和周期设置不对 |