交易模型如下:
runmode:0;
variable:stopprice=0;
DD:=ref(c,1);
EE:=ma(c,60);
ff:=hhv(h,4);
if holding=0 then begin
if c<ee && dd>ee then
buyshort(1,4, thisclose);
stopprice:=ff;
end
if holding<0 then begin
if c<ee && dd>ee then
buyshort(1,2,thisclose);
end
if (holding<-2 && enterprice-c>100) or (holding=-2 && enterprice-c>200) then
sellshort(1,0.5*holding,thisclose);
if holding<0 then begin
if enterprice-c>150 then
stopprice:=stopprice-75;
if c>stopprice then
sellshort(1,holding,thisclose);
end
可用白糖1201品种的15分钟周期查看,可以从2011年8月1日起开始评测,发现图表交易信号根本无法与测评明细一一对应上,
希望金字塔公司迅速修改这个Bug,谢谢!
请先认真看一下再回贴,谢谢。
你说的那个不能解决我说的问题!!!
哪里对不上,请问你的测评是怎么设定的?
我对下来是没有差的
请先认真看一下再回贴,谢谢。
你说的那个不能解决我说的问题!!!
你这种问题我们见多了,还请用户先做自我检查,然后再来确认是否是软件的BUG
代码写的有问题
对您的代码开仓条件做了修改.重点地方,我用红色标识了.如果哪个不懂,请您发帖询问
再测评,就完全一致了.
runmode:0;
variable:stopprice=0;
DD:=ref(c,1);
EE:=ma(c,60);
ff:=hhv(h,4);
if date<1110801 then exit;
if c<ee and dd>ee and holding=0 then
begin
buyshort(1,4, thisclose);
stopprice:=ff;
end
if c<ee and dd>ee and holding<0 and enterbars>0 then
begin
buyshort(1,2,thisclose);
end
if (holding<-2 and enterprice-c>100) or (holding=-2 and enterprice-c>200) then
sellshort(1,0.5*holding,thisclose);
if holding<0 then begin
if enterprice-c>150 then
stopprice:=stopprice-75;
if c>stopprice then
sellshort(1,holding,thisclose);
end
看来你们还是没找到问题的根源所在。
现换个角度再说一下,以这个模型从2011-8-29日进行测评,
从图表上可以看出,中间有在2011-9-5起有三次的止盈减仓,可是在测评明细里没有一次的止盈减仓的操作记录,请帮忙再看一下。
谢谢!
非常感谢楼主!
所说问题已经跟踪到.会在下个版本中更正.
再次建议您看看7楼给您改编的代码,领会领会区别.因为您本人的代码在实盘中会出问题的.