您現在的位置:程序化交易>> 期貨公式>> 金字塔等>> 金字塔知識>>正文內容

請問 大師能否把這個代碼做一個注釋啊? [金字塔]

  • 咨詢內容:

    offset=3

     count = order.ordernum2

     for i = 0 to count-1
      call order.orderinfo2(index, orderid, consign, filled, remaining, action, ordertype, lmtprice,auxprice, account, code, market)
      if ordertype=0 then 
       order.contract code,market,multiplier,mintick,shortpercent,longpercent
       set report1 = marketdata.getreportdata(code,market)
       
       if abs(report1.newprice-lmtprice)>=offset*mintick then
        call order.cancelorder(orderid)
            
        if action=0 and kaiping=0 then
         order.buy 0,remaining,report1.newprice,0,code,market,account,0
        end if
        
        if action=0 and kaiping=1 then
         order.sell 0,remaining,report1.newprice,0,code,market,account,0
        end if
        
        if action=1 and kaiping=0 then
         order.buyshort 0,remaining,report1.newprice,0,code,market,account,0
        end if
        
        if action=1 and kaiping=1 then
         order.sellshort 0,remaining,report1.newprice,0,code,market,account,0
        end if    
       end if
      end if  
     next




    這些參數貌似都沒有地方查。或者給一個可以查的鏈接。非常感謝

     

  • 金字塔客服: Public ExcelApp, iRowNo, iStartPingDuo, iStartPingKong, AccountCountPublic iMultipliter

    Sub ORDER_OrderStatusEx2(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, Account, AccountType)    '賬戶類型 0 IB 1 CTP 2 金仕達    Dim sStatus                         '成交狀態
        If AccountType = 0 Then        sAccType = "0.IB"    ElseIf AccountType = 1 Then        sAccType = "1.CTP"    ElseIf AccountType = 2 Then        sAccType = "2.金士達"    End If            If AccountType = 0 Then        sStatus = "FILLED"    ElseIf AccountType = 1 Then        sStatus = "TRADEING"    ElseIf AccountType = 2 Then        sStatus = "FILLED"    End If    If UCase(Status) = sStatus Then     '只跟蹤成交的單        WriteTradeLog OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, Account    End IfEnd Sub''''''''''''''''''''''''''''''''''''''''''Sub WriteTradeLog(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, AccountCode)    Dim i, j    Dim sSheetName, TradeSxf    On Error Resume Next
                              If iStartPingDuo = 0 Then                iStartPingDuo = 1            End If            If iStartPingKong = 0 Then                iStartPingKong = 1            End If            If Kaiping = 0 Then     '開倉               TBUY(1,Filled,Code)                Else            '平倉                If Aspect = 1 And Kaiping >= 1 Then '平多                                                       End If                If Aspect = 0 And Kaiping >= 1 Then '平空                                 End If            End If       
    End Sub

    TBUY(1,Filled,Code)    我想開倉,截獲的品種和數量,但是系統提示,這樣是不行。請問大神,這個代碼要怎么寫?
    [此貼子已經被作者于2014/10/31 11:43:37編輯過]

     

  • 用戶回復:

    TBUY(1,Filled,Code) 是perl后臺語句,不能用在vba代碼段中,在vba代碼中得用Order對象的buy方法

    建議學習一下我發布的vba代碼范例中的order對象

    http://www.weistock.com/bbs/dispbbs.asp?boardid=5&Id=11642

     

    [此貼子已經被作者于2014/11/1 18:03:36編輯過]

     

  • 網友回復: 謝謝

 

有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友

可聯系技術人員 QQ: 1145508240  點擊這里給我發消息進行 有償 編寫!不貴!點擊查看價格!


【字體: 】【打印文章】【查看評論

相關文章

    沒有相關內容
主站蜘蛛池模板: 丁香九月月小说图片区| 亚洲精品欧美综合| 亚洲一区二区三区不卡在线播放| 亚洲香蕉久久一区二区| 日本护士在线视频xxxx免费| 国产一区二区三区内射高清| 一本加勒比HEZYO无码人妻| 波多野结衣被绝伦强在线观看| 国产在线观看精品香蕉v区| 中文字幕精品一区二区| 牛牛本精品99久久精品| 国产精品一区91| ww亚洲ww在线观看国产| 欧美与黑人午夜性猛交久久久| 国产乱了真实在线观看| eeuss影院机在线播放| 欧美亚洲国产精品久久高清| 国产一级片播放| 98久久人妻无码精品系列蜜桃| 日韩大片高清播放器| 午夜啪啪福利视频| 18禁无遮挡羞羞污污污污免费| 忘忧草日本在线播放www| 久久精品国产大片免费观看| 精品无码久久久久久久动漫| 大学生男男澡堂69gaysex| 亚洲va国产日韩欧美精品 | 午夜dj在线观看免费高清在线| 717午夜伦伦电影理论片| 日本精品3d动漫一区二区| 亚洲日本一区二区一本一道| 视频在线免费观看资源| 大学生男男澡堂69gaysex| 中文字幕人成乱码熟女| 欧美第一页在线观看| 国产人与动zozo| ass亚洲**毛茸茸pics| 成人性生交大片免费看好| 久久综合丝袜长腿丝袜| 精品久久久久久久九九九精品| 国产精品天天在线|