vbs获取股票行情与自行股速度不一致 [金字塔]
- 咨询内容:
此主题相关图片如下:无标题.png
我用VBS接收6只股票行情,大部分时间与自行股行情的最新价显示一致,但偶尔会发现VBS接收的行情会滞后如图上所示请问是什么原因呢?
我目前使用的是免费版
- 金字塔客服:
要看你的VBS的代码是具体怎么写的
- 用户回复:
dim report1
dim report2
dim report3
dim report4
dim report5
dim report6
set report1=nothing
set report2=nothing
set report3=nothing
set report4=nothing
set report5=nothing
set report6=nothing
Sub MARKETDATA_ReportNotify(ReportData)
display
if not report1 is nothing then
frmIndex_txtprice1.text =report1.newprice
end if
if not report2 is nothing then
frmIndex_txtprice2.text =report2.newprice
end if
if not report3 is nothing then
frmIndex_txtprice3.text =report3.newprice
end if
if not report4 is nothing then
frmIndex_txtprice4.text =report4.newprice
end if
if not report5 is nothing then
frmIndex_txtprice5.text =report5.newprice
end if
if not report6 is nothing then
frmIndex_txtprice6.text =report6.newprice
end if
end sub
sub display()
Set report1 = marketdata.GetReportData(frmIndex_report1.text,frmIndex_report1market.text)
Set report2 = marketdata.GetReportData(frmIndex_report2.text,frmIndex_report2market.text)
Set report3 = marketdata.GetReportData(frmIndex_report3.text,frmIndex_report3market.text)
Set report4 = marketdata.GetReportData(frmIndex_report4.text,frmIndex_report4market.text)
Set report5 = marketdata.GetReportData(frmIndex_report5.text,frmIndex_report5market.text)
Set report6 = marketdata.GetReportData(frmIndex_report6.text,frmIndex_report6market.text)end sub
Sub frmIndex_Load()
frmIndex_report1.text="601318"
frmIndex_report1market.text="SH"
frmIndex_report2.text="600016"
frmIndex_report2market.text="SH"
frmIndex_report3.text="601166"
frmIndex_report3market.text="SH"
frmIndex_report4.text="601688"
frmIndex_report4market.text="SH"
frmIndex_report5.text="001979"
frmIndex_report5market.text="SZ"
frmIndex_report6.text="000858"
frmIndex_report6market.text="SZ"
End Sub
Sub frmIndex_cmdStart_Click()
Set report1 = marketdata.GetReportData(frmIndex_report1.text,frmIndex_report1market.text)
Set report2 = marketdata.GetReportData(frmIndex_report2.text,frmIndex_report2market.text)
Set report3 = marketdata.GetReportData(frmIndex_report3.text,frmIndex_report3market.text)
Set report4 = marketdata.GetReportData(frmIndex_report4.text,frmIndex_report4market.text)
Set report5 = marketdata.GetReportData(frmIndex_report5.text,frmIndex_report5market.text)
Set report6 = marketdata.GetReportData(frmIndex_report6.text,frmIndex_report6market.text)if report1 is nothing then
msgbox "品种1代码或市场错误"
exit sub
end if
dim stock1,market1
stock1=frmIndex_report1.text
market1=frmIndex_report1market.text
call marketdata.RegReportNotify(stock1,market1)
dim stock2,market2
stock2=frmIndex_report2.text
market2=frmIndex_report2market.text
call marketdata.RegReportNotify(stock2,market2)dim stock3,market3
stock3=frmIndex_report3.text
market3=frmIndex_report3market.text
call marketdata.RegReportNotify(stock3,market3)dim stock4,market4
stock4=frmIndex_report4.text
market4=frmIndex_report4market.text
call marketdata.RegReportNotify(stock4,market4)dim stock5,market5
stock5=frmIndex_report5.text
market5=frmIndex_report5market.text
call marketdata.RegReportNotify(stock5,market5)dim stock6,market6
stock6=frmIndex_report6.text
market6=frmIndex_report6market.text
call marketdata.RegReportNotify(stock6,market6)
End Sub
- 网友回复:
不是行情滞后,是vbs你获取的比显示盘的来得快
此主题相关图片如下:csu~p7z{@1vi6tfl5eyu3ze.png
- 网友回复: 我用的免费版,我看每次只有3只股票的行情推送过来。免费版对这方面有影响吗?
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容