等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
- wenarm
|
Sub LK()
'初始化股票池名称为“123”,状态池名称为“456”的股票池
Count = marketdata.GetStockPoolCount("123", "456")
dim code0,code1
dim market0,market1
dim Price0,Price1
dim InDate0,InDate1
'取值序号取决于股票池排序方式,前n时,序号0最小,后n时,序号0最大
call marketdata.GetStockPoolData(0,code0,market0,price0,indate0)
call marketdata.GetStockPoolData(1,code1,market1,price1,indate1)
Set Grid0 = Frame1.GetGridByName("window1")
call Grid0.ChangeStock(code0,market0)
Set Grid1 = Frame1.GetGridByName("window2")
call Grid1.ChangeStock(code1,market1)
'释放字符串变量内存
Set Code0 = nothing
Set Market0 = nothing
Set Code1 = nothing
Set Market1 = nothing
End Sub
Call APPLICATION.SetTimer(0,20000)
Sub APPLICATION_VBAStart()
LK
End Sub
Sub APPLICATION_Timer(ID)
LK
End Sub
|
|