以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 公式模型编写问题提交 (http://weistock.com/bbs/list.asp?boardid=4) ---- 平仓反手出现白色箭头 (http://weistock.com/bbs/dispbbs.asp?boardid=4&id=12390) |
-- 作者:yin8jun -- 发布时间:2012/6/12 17:04:28 -- 平仓反手出现白色箭头 平仓反手出现白色箭头,已在开仓前平仓,并且发送价格在信号bar的high,low之间。请问是什么原因?(请看12/5/8这天)
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; A:ssetup,COLORGRAY,LINEDOT; |
-- 作者:rushtaotao -- 发布时间:2012/6/12 17:08:14 -- 这个是价格的问题 未成交 你换市价测试下 应该就没这问题了吧 |
-- 作者:yin8jun -- 发布时间:2012/6/12 17:31:43 -- 把价格换成market, 白色箭头更多了 |
-- 作者:yin8jun -- 发布时间:2012/6/13 9:50:24 -- 昨晚搞了半夜,还是没能解决这个问题。把价格+-5点,白色箭头都还在,应该不是成交价格的问题。望大侠们尽早帮忙。 |
-- 作者:just -- 发布时间:2012/6/14 10:42:45 -- 楼主代码问题很多啊,红色部分写的有问题啊。 sellshort(1,enterprice+i_reverse);end if holding>0 then begin if enterprice-low>=i_reverse then sell(1,enterprice-i_reverse); end if holding=0 then begin if high>=bbreak then buy(1,bbreak); end if holding=0 then begin if low<=sbreak then sellshort(1,sbreak); end |
-- 作者:yin8jun -- 发布时间:2012/6/14 16:32:00 -- 以下是引用just在2012-6-14 10:42:45的发言:
楼主代码问题很多啊,红色部分写的有问题啊。 sellshort(1,enterprice+i_reverse);end if holding>0 then begin if enterprice-low>=i_reverse then sell(1,enterprice-i_reverse); end if holding=0 then begin if high>=bbreak then buy(1,bbreak); end if holding=0 then begin if low<=sbreak then sellshort(1,sbreak); end 谢谢了 |