[原创]筛选连续合约的方法 [金字塔]
- 咨询内容:
以下内容为程序代码:
[此贴子已经被作者于2011-1-22 19:08:35编辑过]
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 - 金字塔客服:
以下内容为程序代码:
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 - 用户回复:
复制粘贴 无法通过
- 网友回复: 去掉行号
相关文章
-
没有相关内容