Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:金字塔的保证金计算错误

1楼
sohuwdj 发表于:2013/8/7 15:17:45
我当前只有一个品种,可是用金字塔的数据接口获得的保证金不一样,即账户里面的保证金和
我唯一的品种的保证金对不上,账户保证金明显是错的,它也是金字塔软件本身显示的保证金。
主要代码如下:
'-------------------------------------------------------------------------------------------------------' 
'@@获取持仓信息
Private MarketArray(), CodeArray(),HoldingArray(), HoldingCostArray(), UserMarginArray(), PNLArray()
Function GetHoldInfo(sAccount)
    On Error resume Next
    HoldingCount = Order.Holding2(sAccount)
    If HoldingCount > 0 then
图片点击可在新窗口打开查看此主题相关图片如下:截图.png
图片点击可在新窗口打开查看
          redim MarketArray(HoldingCount-1)
          redim CodeArray(HoldingCount-1)
          redim HoldingArray(HoldingCount-1)
          redim HoldingCostArray(HoldingCount-1)
          redim UserMarginArray(HoldingCount-1)
          redim PNLArray(HoldingCount-1)
      
          
          For i=0 to HoldingCount-1
                Call Order.HoldingInfo2(i,BuyHolding,BuyCost,BuyTodayHolding,SellHolding,SellCost,SellTodayHolding,PNL,UseMargin,Code,Market_,sAccount)
                if BuyHolding > 0 then
                  HoldStr="+" & BuyHolding
                  HoldCost = BuyCost
                end if
                if SellHolding>0 then 
                  HoldStr= "-" & SellHolding
                  HoldCost = SellCost
                end if  
                MarketArray(i) = Market_
                CodeArray(i) = Code
                HoldingArray(i) = HoldStr
                HoldingCostArray(i) = HoldCost
                UserMarginArray(i) = UseMargin
                PNLArray(i)=PNL
               ' application.MsgOut(usemargin)
            Next
    End If 
    GetHoldInfo = HoldingCount
End Function


Sub APPLICATION_Timer(ID)    
    If ID = 0 Then
       c  & "保证金:     "  &  "现金余额:      " & "浮动盈亏:     "  & "仓位比例:"  & NewLine
      
        b=Order.Account2(28)
        d=Order.Account2(6)
        content = content & Cstr(d) &"      "& Cstr(b) &"       "& Cstr(Order.Account2(3)) &"      "& Cstr(Order.Account2(4)) &"      "& Cstr(b/d*100) &"%"& NewLine
        content = content & "******************************************************************" & NewLine
       GetHoldInfo("808400")
        content =  content & "市场: "  & "  品种: "    & "  持仓量: "  & "  持仓成本: "   & "  保证金: "   & "  浮动盈亏: "  & "仓位比例:"  &   NewLine
        For i=0 To Ubound(HoldingArray)
            content = content & MarketArray(i) &"       "  & CodeArray(i)  & "   " & HoldingArray(i) &"        " & Cstr(HoldingCostArray(i))& "      "& Cstr(UserMarginArray(i)) &"     " & PNLArray(i) &"     " & Cstr(UserMarginArray(i)/d*100)&"%" & NewLine
        Next 
        Asset_Manager_HoldingTable.value = content
    End If
end sub 







2楼
fly 发表于:2013/8/7 16:13:52

您好,您所在的公司是综合交易平台吗?

 

金字塔显示的保证金,和实际的保证金差别大吗?

3楼
rushtaotao 发表于:2013/8/7 16:20:08
您提到的问题,我们会做相关测试
共3 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.17188 s, 2 queries.