Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共4 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[原创]筛选连续合约的方法

1楼
z7c9 发表于:2011/1/22 19:07:48

以下内容为程序代码:

1 sub getcontinuouscontract()
2     dim marketname
3     set b=createobject("stock.block")
4     
5     marketname=Array("SQ","DQ","ZQ","ZJ")    
6     
7     for i=0 to ubound(marketname)
8         n=marketdata.GetReportCount(marketname(i))
9         for j=0 to n-1
10             set myreport = marketdata.GetReportDataByIndex(marketname(i),j)
11             suffixlabel=right(myreport.label,2)
12             if suffixlabel="00" then
13                 b.addstock marketname(i),myreport.label
14             end if    
15         next
16     next
17     
18     b.tosave "自选","自选股"
19 end sub

[此贴子已经被作者于2011-1-22 19:08:35编辑过]
2楼
z7c9 发表于:2011/1/23 15:00:06
以下内容为程序代码:

1 sub getcontinuouscontract()
2     dim block
3     dim market
4     
5     set block=createobject("stock.block")
6     
7     block.open "自选股",1
8     
9     for i=0 to block.count-1
10         block.removeat(0)
11     next    
12     
13     market=array("SQ","DQ","ZQ","ZJ")
14     
15     for i=0 to ubound(market)
16         n=marketdata.GetReportCount(market(i))
17         for j=0 to n-1
18             set report1=marketdata.GetReportDataByIndex(market(i),j)
19             if right(report1.label,2)="00" then
20                 block.addstock market(i),report1.label
21             end if
22         next
23     next
24     
25     block.tosave "自选","自选股"
26     msgbox "完成筛选连续合约"
27 end sub
3楼
tj1abcd 发表于:2011/5/2 23:30:43
复制粘贴 无法通过
4楼
王锋 发表于:2011/5/3 9:05:13
去掉行号
共4 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.03076 s, 2 queries.