大伊人青草狠狠久久-大伊香蕉精品视频在线-大伊香蕉精品一区视频在线-大伊香蕉在线精品不卡视频-大伊香蕉在线精品视频75-大伊香蕉在线精品视频人碰人

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

為什么用自己寫的窗口下單,會彈出確認框? [金字塔]

  • 咨詢內容: 請教 為什么用自己寫的窗口下單,會彈出確認框?
    昨天還沒有,今天改了幾句代碼就這樣

    此主題相關圖片如下:13.jpg

     

  • 金字塔客服:

    if not hangqing is nothing then

             ctp=Order.StockType(symbol,matketID)
             if ctp=1 then
                strDate = Cstr(hangqing.Date)
                'test_tuoke_Label5.caption = strDate
                
                dim num
        dim orderid
        dim ConSign
        dim Filled
        dim R1
        dim Action
        dim OrderType
        dim LmtPrice
        dim Account
        dim Kaiping
        num = Order.OrderInfoByCode2(hangqing.Label,hangqing.marketName, orderid, ConSign, Filled, R1, Action, OrderType, LmtPrice, Account, Kaiping)
        application.MsgOut num
        if num > 1 then
         if lastOrderID = orderid then
          CancelCount = CancelCount + 1
         else
          CancelCount = 0
          lastOrderID = orderid
         end if
         if (CancelCount > 2) then
          call Document.DebugFile("D:\OrderLog.Txt", "CancelOrder:%.2f",orderid )
          call Order.CancelOrder(orderid)
          CancelCount = 0
         end if
        end if
             
                if CountIndex > 5 then
                 dim BuyHoding
         dim BuyTodayHoding
         dim SellHoding
         dim SellTodayHoding
         dim BuyCost
         dim SellCost
         dim PNL
         Dim UseMargin
                 call Order.HoldingInfoByCode2(hangqing.label,hangqing.marketname,BuyHoding,BuyCost,BuyTodayHoding,SellHoding,SellCost,SellTodayHoding,PNL,UseMargin)
                 if BuyHoding > 0 then
                  application.MsgOut  hangqing.LowerLimitPrice
                  application.MsgOut  hangqing.NewPrice
                  msg = "Sell= " & hangqing.LowerLimitPrice
                  msg = msg & "  BuyHoding=" & BuyHoding
                  msg = msg & "  num= " & num
                  call Document.DebugFile("D:\OrderLog.Txt", msg,1)
                  call Order.Sell(0,BuyHoding,hangqing.LowerLimitPrice,0,hangqing.label,hangqing.marketname,"",0)
                  CountIndex = 0
                  
                 end if
                end if
                txt = " Buy= " & hangqing.UpperLimitPrice
                call Document.DebugFile("D:\OrderLog.Txt", txt, 1)
                call Order.Buy(0,lots,hangqing.UpperLimitPrice,0,hangqing.label,hangqing.marketname,"",0)
                CountIndex = CountIndex + 1
                
             elseif ctp=0 then
              msgbox "IB賬戶不支持交易"
       end if
       
      end if  

     

  • 用戶回復: if not hangqing is nothing then
       'test_tuoke_Label1.caption = hangqing.NewPrice
             ctp=Order.StockType(symbol,matketID)
             if ctp=1 then
                strDate = Cstr(hangqing.Date)
                'test_tuoke_Label5.caption = strDate
               
                'dim num
        'dim orderid
        'dim ConSign
        'dim Filled
        'dim R1
        'dim Action
        'dim OrderType
        'dim LmtPrice
        'dim Account
        'dim Kaiping
        'num = Order.OrderInfoByCode2(hangqing.Label,hangqing.marketName, orderid, ConSign, Filled, R1, Action, OrderType, LmtPrice, Account, Kaiping)
        'if num > 1 then
         'if lastOrderID = orderid then
          'CancelCount = CancelCount + 1
         'else
          'CancelCount = 0
          'lastOrderID = orderid
         'end if
         'if (CancelCount > 2) then
          'call Document.DebugFile("D:\OrderLog.Txt", "CancelOrder:%.2f",orderid )
          'call Order.CancelOrder(orderid)
          'CancelCount = 0
         'end if
        'end if
             
                if CountIndex > 5 then
                 dim BuyHoding
         dim BuyTodayHoding
         dim SellHoding
         dim SellTodayHoding
         dim BuyCost
         dim SellCost
         dim PNL
         Dim UseMargin
                 call Order.HoldingInfoByCode2(hangqing.label,hangqing.marketname,BuyHoding,BuyCost,BuyTodayHoding,SellHoding,SellCost,SellTodayHoding,PNL,UseMargin)
                 if SellHoding > 0 then
                  application.MsgOut  hangqing.UpperLimitPrice
                  application.MsgOut  hangqing.NewPrice
                  msg = "SellShort= " & hangqing.UpperLimitPrice
                  msg = msg & "  SellHoding=" & SellHoding
                  msg = msg & "  num= " & num
                  call Document.DebugFile("D:\OrderLog.Txt", msg,0)
                  call Order.SellShort(0,SellHoding,hangqing.UpperLimitPrice,0,hangqing.label,hangqing.marketname,"",1)
                  'msgbox hangqing.UpperLimitPrice
                  'msgbox SellHoding
                  CountIndex = 0 
                 end if
                end if
                txt = " BuyShort= " & hangqing.NewPrice
                call Document.DebugFile("D:\OrderLog.Txt", txt, 0)
                call Order.BuyShort(0,lots,hangqing.NewPrice,0,hangqing.label,hangqing.marketname,"",1)
                CountIndex = CountIndex + 1
                
             elseif ctp=0 then
              msgbox "IB賬戶不支持交易"
       end if
      end if

     

  • 網友回復:

    2樓的代碼直接下單,3樓的代碼就會彈出一樓的提示。

    是在搞不懂這連個代碼有什么區別。

    注銷部分是撤單的部分,應該不影響。

     

  • 網友回復: 非交易時段下單時,就是會彈出對話框的,因為需要對話框彈出讓你來調整預埋單還有價格

 

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

可聯系技術人員 QQ: 1145508240  有需要幫忙請點擊這里留言!!!進行 有償 編寫!不貴!點擊查看價格!


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

相關文章

    沒有相關內容
主站蜘蛛池模板: 私人影院免费观看 | 久久大香香蕉国产免费网站 | 国产伦码精品一区二区 | 农村高清性色生活片 | 视频一区二区国产 | 在线播放日本爽快片 | 欧美 日韩 中字 国产 | 久久国产精品久久久久久 | 爱爱免费视频网站 | 欧美13一16sex 性 | 亚洲性色视频 | 日韩精品一区二区三区四区 | 热灸灸这里只有精品 | 日韩欧美高清 | 国产精品视频观看 | 免费一级片 | 亚洲国产精品婷婷久久 | 色久综合在线 | 91福利视频在线 | 国产亚洲精品国看不卡 | 神马影院我不卡手机 | 国产精品成人观看视频国产奇米 | 天天爽夜夜爽视频 | 国产午夜免费视频 | 免费看美女吃男生私人部位 | 男人天堂成人 | 5060网永久免费一级毛片 | 男人的天堂在线免费视频 | 四虎精品影院在线观看视频 | 成人精品亚洲人成在线 | 97精品国产综合久久久久久欧美 | 久久国产精品99精品国产 | 亚洲综合久久综合激情久久 | 日本欧美三级 | 久久99国产亚洲高清观看韩国 | 婷婷综合五月 | 日本黄色不卡视频 | 亚洲欧美成人综合久久久 | 愉拍精品视频在线观看 | 成人在线综合 | 激情综合网五月 |