'该示例从郑州市场筛选SR合约得最大持仓量做为主力合约 Sub ScreenMaxOpenint() 'MaxCode主力合约代码;MaxOpenint最大持仓量 Dim MaxCode,MaxOpenint,Count,i,Report Count = MarketData.GetReportCount("ZQ")'得到市场所有品种数 For i = 0 To Count - 1 Set Report = MarketData.GetReportDataByIndex("ZQ",i) '只处理SR合约 If Left(Report.Label,2) = "SR" Then '只处理有效合约 If Right(Report.Label,2) >= "01" And Right(Report.Label,2) <= "12" Then If Report.Openint > MaxOpenint Then MaxCode = Report.Label MaxOpenint = Report.Openint End If End If End If Next '显示成交量最大得合约 MsgBox MaxCode End Sub