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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → 原来在3.3版本正常的代码现在升级3.4后老是提示编译缺少history对象

   

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


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

主题:原来在3.3版本正常的代码现在升级3.4后老是提示编译缺少history对象

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


加好友 发短信
等级:超级版主 帖子:18691 积分:0 威望:0 精华:0 注册:2013/7/15 9:22:16
原来在3.3版本正常的代码现在升级3.4后老是提示编译缺少history对象  发帖心情 Post By:2014/12/23 10:43:18 [显示全部帖子]

原来在3.3版本正常的代码现在升级3.4后老是提示编译缺少history对象麻烦高手给看看是什么原因
for pzindex=0 To 5 step 1
  for zhouqi = 0 to 5 step 1
   if zhouqi<2 or zhouqi>4 then
    set History = marketdata.GetHistoryData(code(pzindex),market(pzindex),zhouqi)
    Xa=today
    set mkt = marketdata.GetMarketInfo2(market(pzindex))
    if zhouqi<2 then Xa=cdate(today+mkt.opentime-cdate("1975-1-1")+cdate("00:0" & zhouqimin(zhouqi) & ":00"))
    a=History.GetPosFromDate(Xa)
    aaa=History.GetPosFromDate(cdate(today+mkt.closetime-cdate("1975-1-1")))
    copentime=cdate(mkt.opentime-cdate("1975-1-1"))
    if zhouqi<2 then Kn = mkt.TradeSeconds / 60 / zhouqimin(zhouqi)
    
    if zhouqi=5 then
     if cdate(time)>cdate(copentime) and History.Date(aaa)<>cdate(today) then strcon=strcon & code(pzindex) & " 当天日线缺失" & vbCrLf
    else
     if History.Date(a)<cdate(today) then aa=aaa-a else aa=aaa-a+1
     mins = DateDiff("n",cdate(copentime),cdate(time))
     if mins>-1 and (cdate(time)<cdate("11:30:00") or cdate(time)>cdate("13:00:00")) then'中午休市时不检查
      if cdate(time)<cdate("11:30:00") then
       mins = mins \ zhouqimin(zhouqi)+1
      elseif cdate(time)>cdate("13:00:00") then
       mins = mins \ zhouqimin(zhouqi)+1-90 \ zhouqimin(zhouqi)
      end if
      if mins<>aa and aa<Kn then
       strcon=strcon & code(pzindex) & " 当天" & zhouqimin(zhouqi) & "分钟K线数目前为" & aa & ",应为" & mins & vbCrLf
      elseif aa>Kn then
       strcon=strcon & code(pzindex) & " 当天" & zhouqimin(zhouqi) & "分钟K线数目前为" & aa & ",应为" & Kn & vbCrLf
      end if
     end if
    end if
   end if
  next
 next


 回到顶部