以文本方式查看主题 - 金字塔客服中心 - 专业程序化交易软件提供商 (http://weistock.com/bbs/index.asp) -- 高级功能研发区 (http://weistock.com/bbs/list.asp?boardid=5) ---- 若无持仓,查询持仓的结果是0,还是空 (http://weistock.com/bbs/dispbbs.asp?boardid=5&id=89371) |
-- 作者:chendong -- 发布时间:2016/1/5 19:33:12 -- 若无持仓,查询持仓的结果是0,还是空 Sub GetHoldByCode(sAccount,sCode,sMarket) dim i dim BuyHolding dim BuyCost dim BuyTodayHolding dim SellHolding dim SellCost dim SellTodayHolding dim PNL dim UseMargin dim Code dim Market On Error resume Next AccountStatus=Order.Account2(2,sAccount) \'检测账户是否登陆,如果没有登陆就退出 \'application.MsgOut sCode & "," & sMarket & "," & sAccount & ",NextCode:" & NextCode & ",账户状态:" & AccountStatus if AccountStatus=255 Or AccountStatus="" then exit sub end if Call Order.HoldingInfoByCode2(sCode,sMarket,BuyHolding,BuyCost,BuyTodayHolding,SellHolding,SellCost,SellTodayHolding,PNL,UseMargin,sAccount) BuyHold=BuyHolding SellHold=SellHolding End Sub 这段代码是用来查账户持仓的,请问,若账户没有持仓,那BuyHold的值是0,还是为空。若为空值,如何转为0
|
-- 作者:王锋 -- 发布时间:2016/1/5 21:25:52 -- http://www.weistock.com:8080/vip/forum.php?mod=viewthread&tid=1557&extra=page%3D1 |