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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → BUG:count函数计算错误

   

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


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

主题:BUG:count函数计算错误

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


加好友 发短信
等级:论坛游侠 帖子:369 积分:2060 威望:0 精华:0 注册:2010/7/13 12:13:32
BUG:count函数计算错误  发帖心情 Post By:2011/2/24 12:25:27    Post IP:111.193.165.118[只看该作者]

最近一次升级后,count函数计算出现错误,以前一直没错过。简化公式如下:

 

nSE1:=6;

nBE1:=6;

 

THV2:=HHV(High,5);

TLV2:=LLV(Low,5);

 

DHigh:=max(dynainfo(34),HIGH);
DLow:=min(dynainfo(28),LOW);
hTHV21:=DHigh>THV2;
lTLV21:=TLV2>DLow;

ChTHV21:=count(hTHV21,nSE1);
ClTLV21:=count(lTLV21,nBE1);

 

DEBUGFILE(FILEPATH,'lTLV21:'&numtostr(lTLV21,0)&' hTHV21:'&numtostr(hTHV21,0)&' ClTLV21:'&numtostr(ClTLV21,0)&' ChTHV21:'&numtostr(ChTHV21,0),0);
DEBUGFILE(FILEPATH,'DHigh:'&numtostr(DHigh,1)&' DLow:'&numtostr(DLow,1)&' nSE1:'&numtostr(nSE1,0)&' nBE1:'&numtostr(nBE1,0),0);

 

输出数据出现这样的情况(红色字体):同一周期内,ITLV21一直为0的情况下,count输出变成了1,当lTLV21变成1时,count输出了3。请帮忙查一下是什么问题,是否最近的升级对count有改动。我用的是后台序列模式。谢谢。

 

2011-02-24 10:35:58.286    =======
2011-02-24 10:35:58.286    Time:103600.000 cTime:103558.000
2011-02-24 10:35:58.302    O:3197.0 H:3198.2 L:3191.6 C:3192.2
2011-02-24 10:35:58.318    DY28:3191.8 DY34:3192.0 minL28:3191.6 maxH34:3198.2
2011-02-24 10:35:58.349    HV12:3209.00 LV12:3165.40 THV2:3183.17 TLV2:3191.23
2011-02-24 10:35:58.364    lTLV21:0 hTHV21:1 ClTLV21:0 ChTHV21:44
2011-02-24 10:35:58.396    DHigh:3198.2 DLow:3191.6 nSE1:44 nBE1:6
2011-02-24 10:35:58.411    SO:0 BO:0 TSubmit(0):0.00
2011-02-24 10:35:58.458    SLH:3206.4 SLL:3188.4 HR:11.6 LR:32.0 B_SL:0 S_SL:0
2011-02-24 10:35:58.458    TBHEX:5 TSHEX:0 TV4B:5
2011-02-24 10:35:58.458    TAP:3197.4 TEP:3197.4
2011-02-24 10:35:58.474    MATR:6.7
2011-02-24 10:35:58.474    N1:62 N2:5 SL:9 OA:5 AP:3 HT:81
2011-02-24 10:35:58.474    X:2.66
2011-02-24 10:35:58.489    GSL:0 GBP:0 BP:117
2011-02-24 10:35:59.427    =======
2011-02-24 10:35:59.427    Time:103600.000 cTime:103559.000
2011-02-24 10:35:59.443    O:3197.0 H:3198.2 L:3191.6 C:3191.8
2011-02-24 10:35:59.458    DY28:3191.6 DY34:3191.8 minL28:3191.6 maxH34:3198.2
2011-02-24 10:35:59.474    HV12:3209.00 LV12:3165.40 THV2:3183.17 TLV2:3191.23
2011-02-24 10:35:59.505    lTLV21:0 hTHV21:1 ClTLV21:1 ChTHV21:44
2011-02-24 10:35:59.536    DHigh:3198.2 DLow:3191.6 nSE1:44 nBE1:6
2011-02-24 10:35:59.552    SO:0 BO:0 TSubmit(0):0.00
2011-02-24 10:35:59.599    SLH:3206.4 SLL:3188.4 HR:11.6 LR:1.2 B_SL:0 S_SL:0
2011-02-24 10:35:59.599    TBHEX:5 TSHEX:0 TV4B:5
2011-02-24 10:35:59.599    TAP:3197.4 TEP:3197.4
2011-02-24 10:35:59.614    MATR:6.7
2011-02-24 10:35:59.614    N1:62 N2:5 SL:9 OA:5 AP:3 HT:81
2011-02-24 10:35:59.614    X:2.66
2011-02-24 10:35:59.614    GSL:0 GBP:0 BP:117
2011-02-24 10:36:00.130    =======
2011-02-24 10:36:00.130    Time:103600.000 cTime:103600.000
2011-02-24 10:36:00.146    O:3197.0 H:3198.2 L:3191.6 C:3191.6
2011-02-24 10:36:00.161    DY28:3191.6 DY34:3191.8 minL28:3191.6 maxH34:3198.2
2011-02-24 10:36:00.177    HV12:3209.00 LV12:3165.40 THV2:3183.17 TLV2:3191.23
2011-02-24 10:36:00.208    lTLV21:0 hTHV21:1 ClTLV21:1 ChTHV21:44
2011-02-24 10:36:00.239    DHigh:3198.2 DLow:3191.6 nSE1:44 nBE1:6
2011-02-24 10:36:00.255    SO:0 BO:0 TSubmit(0):0.00
2011-02-24 10:36:00.302    SLH:3206.4 SLL:3188.4 HR:11.6 LR:1.2 B_SL:0 S_SL:0
2011-02-24 10:36:00.302    TBHEX:5 TSHEX:0 TV4B:5
2011-02-24 10:36:00.318    TAP:3197.4 TEP:3197.4
2011-02-24 10:36:00.318    MATR:6.7
2011-02-24 10:36:00.318    N1:62 N2:5 SL:9 OA:5 AP:3 HT:81
2011-02-24 10:36:00.318    X:2.66
2011-02-24 10:36:00.333    GSL:0 GBP:0 BP:117
2011-02-24 10:36:00.536    =======
2011-02-24 10:36:00.536    Time:103600.000 cTime:103600.000
2011-02-24 10:36:00.552    O:3197.0 H:3198.2 L:3191.4 C:3191.4
2011-02-24 10:36:00.568    DY28:3191.4 DY34:3191.8 minL28:3191.4 maxH34:3198.2
2011-02-24 10:36:00.599    HV12:3209.00 LV12:3165.40 THV2:3183.17 TLV2:3191.23
2011-02-24 10:36:00.614    lTLV21:0 hTHV21:1 ClTLV21:1 ChTHV21:44
2011-02-24 10:36:00.646    DHigh:3198.2 DLow:3191.4 nSE1:44 nBE1:6
2011-02-24 10:36:00.661    SO:0 BO:0 TSubmit(0):0.00
2011-02-24 10:36:00.708    SLH:3206.4 SLL:3188.4 HR:11.6 LR:1.2 B_SL:0 S_SL:0
2011-02-24 10:36:00.708    TBHEX:5 TSHEX:0 TV4B:5
2011-02-24 10:36:00.708    TAP:3197.4 TEP:3197.4
2011-02-24 10:36:00.724    MATR:6.7
2011-02-24 10:36:00.724    N1:62 N2:5 SL:9 OA:5 AP:3 HT:81
2011-02-24 10:36:00.724    X:2.66
2011-02-24 10:36:00.724    GSL:0 GBP:0 BP:117
2011-02-24 10:36:00.880    =======
2011-02-24 10:36:00.880    Time:103600.000 cTime:103600.000
2011-02-24 10:36:00.896    O:3197.0 H:3198.2 L:3191.2 C:3191.2
2011-02-24 10:36:00.911    DY28:3191.2 DY34:3191.6 minL28:3191.2 maxH34:3198.2
2011-02-24 10:36:00.943    HV12:3209.00 LV12:3165.40 THV2:3183.17 TLV2:3191.23
2011-02-24 10:36:00.958    lTLV21:1 hTHV21:1 ClTLV21:3 ChTHV21:44
2011-02-24 10:36:00.989    DHigh:3198.2 DLow:3191.2 nSE1:44 nBE1:6
2011-02-24 10:36:01.005    SO:0 BO:0 TSubmit(0):0.00
2011-02-24 10:36:01.052    SLH:3206.4 SLL:3188.4 HR:11.6 LR:1.6 B_SL:0 S_SL:0
2011-02-24 10:36:01.068    TBHEX:5 TSHEX:0 TV4B:5
2011-02-24 10:36:01.068    TAP:3197.4 TEP:3197.4
2011-02-24 10:36:01.068    MATR:6.7
2011-02-24 10:36:01.068    N1:62 N2:5 SL:9 OA:5 AP:3 HT:81
2011-02-24 10:36:01.068    X:2.66
2011-02-24 10:36:01.083    GSL:0 GBP:0 BP:117
2011-02-24 10:36:01.552    =======
2011-02-24 10:36:01.552    Time:103600.000 cTime:103601.000
2011-02-24 10:36:01.568    O:3197.0 H:3198.2 L:3191.2 C:3191.6
2011-02-24 10:36:01.568    DY28:3191.2 DY34:3191.6 minL28:3191.2 maxH34:3198.2
2011-02-24 10:36:01.599    HV12:3209.00 LV12:3165.40 THV2:3183.17 TLV2:3191.23
2011-02-24 10:36:01.614    lTLV21:1 hTHV21:1 ClTLV21:3 ChTHV21:44
2011-02-24 10:36:01.646    DHigh:3198.2 DLow:3191.2 nSE1:44 nBE1:6
2011-02-24 10:36:01.677    SO:0 BO:0 TSubmit(0):0.00
2011-02-24 10:36:01.724    SLH:3206.4 SLL:3188.4 HR:11.6 LR:1.6 B_SL:0 S_SL:0
2011-02-24 10:36:01.724    TBHEX:5 TSHEX:0 TV4B:5
2011-02-24 10:36:01.724    TAP:3197.4 TEP:3197.4
2011-02-24 10:36:01.724    MATR:6.7
2011-02-24 10:36:01.724    N1:62 N2:5 SL:9 OA:5 AP:3 HT:81
2011-02-24 10:36:01.739    X:2.66
2011-02-24 10:36:01.739    GSL:0 GBP:0 BP:117

 


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


加好友 发短信
等级:管理员 帖子:5082 积分:17642 威望:0 精华:6 注册:2010/7/15 9:05:58
  发帖心情 Post By:2011/2/24 13:44:25    Post IP:58.246.57.26[只看该作者]

COUNT函数是没问题的.

问题出在dynainfo的使用上----dynainfo返回常数,而非序列变量.

可参考此帖

http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=1907&page=1&star=1

 



金字塔—专业程序化交易量化投资平台

客户服务部

-----------------------------------------------------------

欢迎您参加我公司的技术培训,具体培训需求请发邮件到

service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

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


加好友 发短信
等级:论坛游侠 帖子:369 积分:2060 威望:0 精华:0 注册:2010/7/13 12:13:32
  发帖心情 Post By:2011/2/24 13:47:08    Post IP:111.193.165.118[只看该作者]

嗯,我也发现了。谢谢!

 回到顶部