VBA求助 [金字塔]
- 咨詢內(nèi)容:
不知道什么原因,總提示語法錯(cuò)誤,將前兩行的定義 數(shù)據(jù)類型去掉,仍然報(bào)語法錯(cuò)誤,希望高手解答啊~
public InpMinihub as Integer
public hubnum as Integerpublic hubid()
public hubopen()
public hubclose()
public hubbas()
public hublast()private history
private grdSub Init(gridobj as grid)
grd=gridobj
history=grd.getHistoryData()
InpMiniHub=3
End SubSub getHub()
hubnum=0
barpos=0
do
barpos=dupHub(barpos)
loop while barpos<history.count-1End Sub
Function dupHub(pos as integer)
dim curopen,curclose,curbas,curlast
dim wide as integer
curopen=history.High(pos)
curclose=history.Low(pos)
curbas=pos
wide=1
for idx=pos+1 to history.datacount-1
if (history.high(idx)<curclose or history.low(idx)>curopen) then
if (wide<InpMiniHub) then
dupHub=idx
exit function
else
hubopen(hubnum)=curopen
hubclose(hubnum)=curclose
hubbas(hubnum)=curbas
hublast(hubnum)=idx-1
hubwide(hubnum)=getHubLevel(hublast-hubbas+1)
hubid(hubnum)="0_"+hubbas(hubnum)+"_"+hublast(hubnum)
dupHub=idx
hubnum++
exit function
end if
else
wide++
curopen=(curopen*wide+history.high(idx))/(wide+1)
curclose=(curclose*wide+history.low(idx))/(wide+1)
end if
next
End Function - 金字塔客服:
你這里根本就不是VBS的語法
- 用戶回復(fù):
vbs沒有數(shù)據(jù)類型定義的,那些as Integer之類的都需要修改,函數(shù)的參數(shù)也一樣,不要定義數(shù)據(jù)類型。
- 網(wǎng)友回復(fù):
http://www.weistock.com/bbs/dispbbs.asp?boardid=5&Id=10387
看看這個(gè)帖子,好好學(xué)習(xí)一下vbs語法。
如果以上指標(biāo)公式不適用于您常用的行情軟件
或者您想改編成選股公式,以便快速選出某種形態(tài)個(gè)股的話,
相關(guān)文章
-
沒有相關(guān)內(nèi)容