VBA求助 [金字塔]
- 咨詢內容:
不知道什么原因,總提示語法錯誤,將前兩行的定義 數據類型去掉,仍然報語法錯誤,希望高手解答啊~
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的語法
- 用戶回復:
vbs沒有數據類型定義的,那些as Integer之類的都需要修改,函數的參數也一樣,不要定義數據類型。
- 網友回復:
http://www.weistock.com/bbs/dispbbs.asp?boardid=5&Id=10387
看看這個帖子,好好學習一下vbs語法。
如果以上指標公式不適用于您常用的行情軟件
或者您想改編成選股公式,以便快速選出某種形態個股的話,
- 上一篇:求助 實現編程
- 下一篇:[求助] VBA中讀取歷史分鐘數據?
相關文章
-
沒有相關內容