Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:止损20点和止损200点效果一样,为何?

1楼
tanyongde 发表于:2016/11/25 16:48:40
tr1 :=max(max((high-low),abs(ref(close,1)-high)),abs(ref(close,1)-low));

atr:=ma(tr1,length); 

enterbars1:=enterbars+1;

dstop1:=dstop-4*ref(atr,1);//平多价

kstop1:=kstop+4*ref(atr,1);//平空价

dstop:=hhv(h,enterbars1);//实时进多平仓价

kstop:=llv(l,enterbars1);//实时进空平仓价

zsx1:=if(dstop>enterprice+20*ref(atr,enterbars1),enterprice+5*mindiff,0.02*ref(c,enterbars1));

zsx2:=if(kstop<enterprice-20*ref(atr,enterbars1),enterprice-5*mindiff,0.02*ref(c,enterbars1));

if myhoiding>0 and c<=max(zsx1,dstop1) then sell(1,0,marketr);

if myhoiding<0 and c>=min(zsx2,kstop1) then sellshort(1,0,marketr);

上面止损不知什么原因?修改“20*ref(atr,enterbars1)”为200*ref(atr,enterbars1)”结果一样!!
2楼
jinzhe 发表于:2016/11/25 17:00:08

你输出一下dstop和ref(atr,enterbars1)

看看是不是dstop很大,大到比200*ref(atr,enterbars1)还大

共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01563 s, 3 queries.