-- 作者:阿火
-- 发布时间:2012/3/6 10:00:40
--
input:fudu(15,10,30,1); variable:hh=drawnull,ll=drawnull; entertime:=barpos>20; hi20:=ref(hhv(h,20),1); lo20:=ref(llv(l,20),1); yl:=max(ll+fudu,hi20); zc:=min(hh-fudu,lo20); bb:=ref(c>ma(c,20),1); ss:=ref(c<ma(c,20),1); if h>yl then begin if holding<0 then begin sellshort(1,1,limitr,max(o,yl+0.2)+0.4); buy(1,1,limitr,max(o,yl+0.2)+0.4); hh:=h; goto skip@; //这里要有跳转,很重要 end else if bb and holding=0 then begin//首次下单有可能同时符合向上突破和向下突破,所有用均线过滤一下 buy(1,1,limitr,max(o,yl+0.2)+0.4); hh:=h; end end
if l<zc then begin if holding>0 then begin sell(1,1,limitr,min(o,zc-0.2)-0.4); buyshort(1,1,limitr,min(o,zc-0.2)-0.4); ll:=l; end else if holding=0 and ss then begin//首次下单有可能同时符合向上突破和向下突破,所有用均线过滤一下 buyshort(1,1,limitr,min(o,zc-0.2)-0.4); ll:=l; end end skip@; if h>hh then hh:=h; if l<ll then ll:=l;
if barpos=1 then begin hh:=h; ll:=l; end
fudu自己调整,或者改为百分比
其他细节自己动手,勤思考才能进步啊
类似的技术技巧,阿火秘笈 这个帖子里都有涉及啊。怎么就不去体会体会呢。
[此贴子已经被作者于2012-3-6 10:04:36编辑过]
|