欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [原创]测评完全不对,百思不得其解

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有9186人关注过本帖树形打印复制链接

主题:[原创]测评完全不对,百思不得其解

帅哥哟,离线,有人找我吗?
fengxiaoyong
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:94 积分:65 威望:0 精华:0 注册:2012/1/6 12:53:19
[原创]测评完全不对,百思不得其解  发帖心情 Post By:2012/5/15 22:08:55    Post IP:114.229.245.186[只看该作者]

今天把TB下收益率还不错的系统移植到金字塔来,但是发现测评交易次数和成功率以及信号完全不对,数据也是补全的,不知道是怎么回事,我把程序贴出来如下,请各位看看,帮我分析一下
图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:2.jpg
图片点击可在新窗口打开查看
runmode:0;
input:N1(5),N2(11),InitalStop(0.2),BreakEventStop(0.2),
      TrailingStop(0.5),ntimes(4),everylots(1);
variable:bcrossup :=0;
variable:bcrossdown :=0;    
nshort  : ema((high+low+2*close)/4,n1);
nlong   : ema((hhv(high,n2)+llv(low,n2)),n2)/2;

blongEntryCon : cross(nshort,nlong) and nshort>ref(nshort,1) and nlong>ref(nlong,1);
bshortentrycon :cross(nlong,nshort) and nshort<ref(nshort,1) and nlong<ref(nlong,1);
bReLongCon :=  nshort>ref(nshort,1) and nlong>ref(nlong,1) and nshort>nlong  and high>hhv(HIGH[1],N1) and close>nlong;
bReShortCon := nshort<ref(nshort,1) and nlong<ref(nlong,1) and nshort<nlong  and low<llv(low[1],N1) and close<nlong;
nhighswing :=hhv(high,enterbars);
nLowSwing :=llv(low,enterbars);
if holding>0 then
begin
    stopline :=avgenterprice*(1-InitalStop/100);
    if nhighswing>avgenterprice * (1+BreakEventStop/100) then stopline :=avgenterprice;
    else if StopLine < nHighSwing*(1-TrailingStop/100) then stopline :=nHighSwing*(1-TrailingStop/100);
    else if stopline>=(close+low+2*high)/4 then
    begin
               myprice := stopline;
               if thisclose<myprice then myprice:=thisclose;
               风险平多: sell(holding>0,everylots,myprice);     
    end; 
    if bshortentrycon then    指标平多 : sell(holding>0,everylots,thisclose);

end
if holding<0 then
begin
          StopLine :=avgenterprice*(1+InitalStop/100);//初始止损
          If nLowSwing <= avgenterprice * (1-BreakEventStop/100)  then StopLine := avgenterprice;
          else If StopLine > nLowSwing*(1+TrailingStop/100) then   StopLine := nLowSwing*(1+TrailingStop/100);//// 追踪止损的价位超过保本止损价,止损价随盈利峰值价的上升同步提高
 else If((high+low*2+close)/4 >= StopLine) then
          begin
          MyPrice = StopLine;
          If thisclose < MyPrice  then MyPrice = thisclose;
             风险平空:  sellshort(1 and  holding<0,EveryLots,MyPrice);
 end
     if bLongEntryCon then 指标平空:  sellshort(1 and  holding<0,EveryLots,thisclose);
end
if holding=0 then
begin
  if blongentrycon  then     指标开多仓:buy(1 and holding=0,everylots,thisclose);//(blongentrycon and holding=0,everylots,market);
  if bshortentrycon then     指标开空仓:buyshort(1 and holding=0,everylots,thisclose);//(bshortentrycon and holding=0,everylots,market);
  if brelongcon then  指标继续开多仓:buy(1 and holding=0,everylots,thisclose);//(brelongcon and holding=0 ,everylots,market);
  if bReShortCon then 指标继续开空仓:buyshort(1 and holding=0,everylots,thisclose);//(bReShortCon and holding=0,everylots,market);
end
资产:ASSET,NOAXIS;
可用现金:CASH(0),LINETHICK0;
持仓:HOLDING,LINETHICK0;

 回到顶部
帅哥哟,离线,有人找我吗?
admin
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
  发帖心情 Post By:2012/5/15 22:11:12    Post IP:114.92.115.100[只看该作者]

在图表上显示的进出场点正常吗?


 回到顶部
帅哥哟,离线,有人找我吗?
fengxiaoyong
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:94 积分:65 威望:0 精华:0 注册:2012/1/6 12:53:19
  发帖心情 Post By:2012/5/15 23:35:59    Post IP:114.229.245.186[只看该作者]

图表显示的进出场点是正常的

 回到顶部
帅哥哟,离线,有人找我吗?
admin
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
  发帖心情 Post By:2012/5/15 23:51:21    Post IP:114.92.115.100[只看该作者]

仔细检查第一步的周期选择,还有第二步的时间段


 回到顶部
帅哥哟,离线,有人找我吗?
rushtaotao
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2012/5/16 8:43:42    Post IP:58.246.57.26[只看该作者]


图片点击可在新窗口打开查看此主题相关图片如下:时间段.png
图片点击可在新窗口打开查看

图片点击可在新窗口打开查看此主题相关图片如下:日期.png
图片点击可在新窗口打开查看
其次就是保证数据完整,还有双向测试还是单向测试,如果信号和TB完全一样,测试结果应该是一样的

 回到顶部
帅哥哟,离线,有人找我吗?
fengxiaoyong
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:94 积分:65 威望:0 精华:0 注册:2012/1/6 12:53:19
  发帖心情 Post By:2012/5/16 23:02:38    Post IP:180.98.138.170[只看该作者]

我把数据补齐了周期也选择了但是交易只有一次和tb完全不一样

 回到顶部
帅哥哟,离线,有人找我吗?
fengxiaoyong
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:94 积分:65 威望:0 精华:0 注册:2012/1/6 12:53:19
  发帖心情 Post By:2012/5/16 23:03:45    Post IP:180.98.138.170[只看该作者]

谁能实际的帮我解决一下问题代码都贴出来了你们可以自己测试一下

 回到顶部
帅哥哟,离线,有人找我吗?
antonyxu99
  8楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 资深程序员
等级:论坛游民 帖子:154 积分:327 威望:0 精华:0 注册:2011/10/4 23:41:24
如何寻找每日开盘到现在的最低价?  发帖心情 Post By:2012/5/16 23:19:00    Post IP:114.113.83.191[只看该作者]

我帮人转过无数的tb到金字塔,有一些常见问题需要注意的,比如序列变量和全局变量的差别,金字塔和tb差别很大;

函数的差别——尤其是比如开仓,金字塔不会自动平了开,tb会;还有比如enterbar和entrybar差别,等

你得把tb的代码贴出来我才能给你检查出到底哪儿的问题

[此贴子已经被作者于2012-5-16 23:19:38编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
admin
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:管理员 帖子:7302 积分:32559 威望:1000 精华:45 注册:2003/12/30 16:34:32
  发帖心情 Post By:2012/5/16 23:20:11    Post IP:180.158.247.56[只看该作者]

我们是没法跟TB比对的,你可以截图上说明,告知你的测试范围参数,以及具体哪笔数据测试结果有问题,正确的应该是怎样,这样我们才能帮你找出问题

 回到顶部
帅哥哟,离线,有人找我吗?
fengxiaoyong
  10楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:新手上路 帖子:94 积分:65 威望:0 精华:0 注册:2012/1/6 12:53:19
  发帖心情 Post By:2012/5/16 23:25:22    Post IP:180.98.138.170[只看该作者]

我把代码都贴出来了你们测试出来的数据正常吗

 回到顶部
总数 26 1 2 3 下一页