以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://www.weistock.com/bbs/index.asp) -- 交易策略发布专区 (http://www.weistock.com/bbs/list.asp?boardid=10) ---- [交易系统]R-Breaker (http://www.weistock.com/bbs/dispbbs.asp?boardid=10&id=9038) |
|
-- 作者:z7c9 -- 发布时间:2011/11/18 22:38:44 -- [交易系统]R-Breaker
runmode:0; input:notbef(090000); variable:ssetup=0; i_reverse:=myreverse*(callstock(stklabel,vtopen,6,0)/100); if barpos=1 then begin hh:=ref(hitoday,1); if date>ref(date,1) then begin if high>hitoday then hitoday:=high; if time>=notbef and time<notaft and startnow>=2 and rfilter then begin if time>=notaft then begin 盈亏:asset-500000,noaxis,coloryellow,linethick2; |
|
-- 作者:newbasic -- 发布时间:2011/11/20 8:48:30 -- 什么周期? |
|
-- 作者:淡定688 -- 发布时间:2011/11/20 22:23:23 -- 非常感谢z7c9版主! |
|
-- 作者:yin8jun -- 发布时间:2012/6/12 13:54:44 -- rb强大 |
|
-- 作者:carl9186 -- 发布时间:2012/6/25 17:24:06 -- if holding=0 then begin
条件有问题,会产生不断的开平仓 >= 改为 > 把 <=改为< 现象消失, 不知符合愿意否? |
|
-- 作者:疾风游侠 -- 发布时间:2012/8/3 1:50:53 -- 这帖子没人回啊?是有这个问题啊
|
|
-- 作者:Jamselizj -- 发布时间:2012/8/9 17:16:20 -- if hitoday>=ssetup and holding>=0 then begin//这里错误,应该是high if low<=senter+(hitoday-ssetup)/div then begin sell(1,holding,limitr,senter+(hitoday-ssetup)/div); sellshort(1,1,limitr,senter+(hitoday-ssetup)/div); end end if ltoday<=bsetup and holding<=0 then begin//这里错误,应该是low if high>=benter-(bsetup-ltoday)/div then begin if high>=benter-(bsetup-ltoday)/div then begin//重复了 sellshort(1,holding,limitr,benter-(bsetup-ltoday)/div); buy(1,1,limitr,benter-(bsetup-ltoday)/div); end end end 这样修改后,B-breaker就完善了。否则会出现锁仓的bug。 |
|
-- 作者:jzts -- 发布时间:2012/9/28 23:46:42 -- 公式里定义了 hitoday:=high;
还会出现您说的问题吗??? |
|
-- 作者:jzts -- 发布时间:2012/9/28 23:48:05 -- 以下是引用Jamselizj在2012-8-9 17:16:20的发言:
if hitoday>=ssetup and holding>=0 then begin//这里错误,应该是high if low<=senter+(hitoday-ssetup)/div then begin sell(1,holding,limitr,senter+(hitoday-ssetup)/div); sellshort(1,1,limitr,senter+(hitoday-ssetup)/div); end end if ltoday<=bsetup and holding<=0 then begin//这里错误,应该是low if high>=benter-(bsetup-ltoday)/div then begin if high>=benter-(bsetup-ltoday)/div then begin//重复了 sellshort(1,holding,limitr,benter-(bsetup-ltoday)/div); buy(1,1,limitr,benter-(bsetup-ltoday)/div); end end end 这样修改后,B-breaker就完善了。否则会出现锁仓的bug。 |