打印本文打印本文 关闭窗口关闭窗口

vba中有个头疼的开盘时间问题

作者:金字塔 来源:cxh99.com 发布时间:2014年12月19日
  • 咨询内容: 我希望开盘后程序才运行,因此用了一个
    iopen=reportdata.open
    iopen>0来判断,但是iopen在集合竞价的时候就大于0了,也就是提前了1分钟.这不是我想要的.如何写呢?要考虑夜盘的开盘时间不同

     

  • 金字塔客服: 可能要用reportdata.IsVirtualData判断,明天再试试

     

  • 用户回复:

    IsVirtualData 属性的集合竞价数据不是你理解的哪种,期货的开盘前第一笔数据已经不是集合竞价数据了。

    你可以使用 ReportData.date 属性,这个属性表示最新一笔报价的交易所时间,用这个来做判断

     

  • 网友回复: 刚刚看到你的回复.我今天早上测试了一下,有这么个疑问:jihe=reportdata.IsVirtualDatathisopen=reportdata.opentLabel=GRID.StockLabelif thisopen>0 and jihe=0 then  application.msgout time & " tLabel:" & tLabel &" work! thisopen:" & thisopen & " jihe:" & jiheend if
    8:59:20 tLabel:M00 work! thisopen:3270 jihe:09:00:06 tLabel:SRX00 work! thisopen:4491 jihe:09:00:12 tLabel:TA00 work! thisopen:6912 jihe:0
    我就纳闷了,为什么大商所在9点前运行了,而郑商所在9点后才运行?我核实了一下电脑时间和金字塔右下角的时间,对得上.

     

  • 网友回复:

    要看你的VBA代码怎么个触发运行模式了

打印本文打印本文 关闭窗口关闭窗口