<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # 5-4、交易主機 # 交易主機 - - - - - - ![](https://box.kancloud.cn/2869f58f691f1e2af0bf569197459ff8_20x20.png)此頁面上的所有內容僅適用于\[\[交易終端\]\]。 交易主機是[經紀商API](Broker-API.html)與圖表交易子系統之間的交互API。 其主要目的是用您的交易邏輯與圖表之間交換信息。 就`JS`而言,它是一個具有一組函數的`object`。 以下是主機的 **方法** 列表。 ## 命令 #### showOrderDialog(order, handler, focus) : Promise 1. `order` 被放置或修改 2. `handler` 是一個處理買/賣/修改的功能。 它應該返回Promise 3. `focus` - [焦點常量](Trading-Objects-and-Constants.html#focusoptions). 顯示標準訂單對話框以創建或修改訂單,并執行處理程序(如果以下達買/賣/修改指令)。 #### showCancelOrderDialog(orderId, handler) : Promise 1. `orderId` 待取消訂單的編號 2. `handler` 處理取消的功能。它返回 Promise 顯示一個確認對話框,并按下YES/OK,執行處理程序。 #### showCancelMultipleOrdersDialog(symbol, side, qty, handler) : Promise 1. `symbol` 取消訂單商品 2. `side` - 取消訂單方向 3. `qty` - 取消訂單數量 4. `handler` 處理取消的功能。它返回 Promise 顯示一個確認對話框,并按下YES/OK,執行處理程序。 #### showClosePositionDialog(\[\[positionId|Trading-Objects-and-Constants#position\]\], handler) : Promise 1. `positionId` 要平倉的持倉id 2. `handler` 處理平倉的功能。它返回 Promise 顯示一個確認對話框,并按下YES/OK,執行處理程序。 #### showReversePositionDialog([position](Trading-Objects-and-Constants.html#position), handler) : Promise 1. `position` 進行反轉 2. `handler` 處理持倉反轉的功能。它返回 Promise 顯示一個確認對話框,并按下YES/OK,執行處理程序。 #### showPositionBracketsDialog([position](Trading-Objects-and-Constants.html#position), \[\[brackets|Trading-Objects-and-Constants#brackets\]\], focus, handler) : Promise 1. `position` 進行修改 2. `brackets` (可選) new [brackets](Trading-Objects-and-Constants.html#Brackets) 3. `focus` - [焦點常量](Trading-Objects-and-Constants.html#focusoptions). 4. `handler` 是一個處理brackets修改的函數。 它應該回來Promise 顯示默認的編輯括號對話框,并在按下修改時執行處理程序。 #### activateBottomWidget : Promise 打開底部面板和開關選項卡到交易。 #### showTradingProperties() 顯示屬性對話框,切換當前標簽到交易。 #### showNotification(title, text, type) 顯示通知。類型可以是 `1` - 成功 或 `0` - 錯誤。 #### triggerShowActiveOrders() 觸發器顯示活動訂單。 #### numericFormatter(decimalPlaces) 以指定的小數位數返回一個[Formatter](Trading-Objects-and-Constants.html#focusoptions)。 #### defaultFormatter(symbol) 返回指定儀器的默認值[Formatter](Trading-Objects-and-Constants.html#focusoptions)以格式化程序。這個格式化器是基于[SymbolInfo](Symbology.html#symbolinfo-structure)創建的。 #### factory `factory` 是一個對象屬性。 其成員如下所述。 #### factory.createDelegate 創建一個[Delegate](Delegate.html)對象。 #### factory.createWatchedValue 創建一個[WatchedValue](WatchedValue.html) 對象。 #### symbolSnapshot(symbol) : Promise 返回商品報價。 ## Getters and Setters #### floatingTradingPanelVisibility: [WatchedValue](WatchedValue.html) 返回floatingTradingPanel是否可見。 #### showPricesWithZeroVolume: [WatchedValue](WatchedValue.html) 返回是否折疊0成交量(最小和最大成交量級別)的級別。 #### suggestedQty() : Object 返回的對象屬性: 1. value - 獲取當前值。 它返回Promise. 2. setValue - 設置新值 3. changed : [Subscription](Subscription.html)它是在交易浮動面板和對話框中同步數量。 #### setButtonDropdownActions(actions) 底部交易面板有一個帶有下拉列表項目的按鈕。 此方法可用于替換現有項目。 1. `actions` [ActionMetainfo](Trading-Objects-and-Constants.html#actionmetainfo)的數組, 每個對象都代表一個下拉項。 #### defaultContextMenuActions() 提供默認的買/賣,顯示屬性操作作為默認值由[chartContextMenuItems](Trading-Controller#chartcontextmenuitemse)返回。 #### defaultDropdownMenuActions(options) 提供操作的默認下拉列表。 您可以在[setButtonDropdownActions](#setButtonDropdownActionsactions)中使用默認操作。 您可以使用 `options` 從結果中添加/刪除默認操作: 1. `showFloatingToolbar`: boolean; 2. `tradingProperties`: boolean; 3. `selectAnotherBroker`: boolean; 4. `disconnect`: boolean; ## 數據更新 需要使用這些方法來通知圖表需要更新信息。 #### orderUpdate([order](Trading-Objects-and-Constants.html#order)) 在添加或更改訂單時調用此方法。 #### orderPartialUpdate([order](Trading-Objects-and-Constants.html#order)) 當訂單未更改時調用此方法,但您添加到在賬戶管理器中顯示的訂單對象的字段已更改。 僅當您要在[Account Manager](Account-Manager.html)中顯示自定義字段時才應使用它。 #### positionUpdate ([position](Trading-Objects-and-Constants.html#position)) 在添加或更改持倉時調用此方法。 #### positionPartialUpdate ([position](Trading-Objects-and-Constants.html#position)) 當持倉未更改時調用此方法,但您添加到在賬戶管理器中顯示的持倉對象的字段已更改。 僅當您要在[Account Manager](Account-Manager.html)中顯示自定義字段時才應使用它。 #### executionUpdate(\[\[execution|Trading-Objects-and-Constants#execution\]\]) 添加執行時調用此方法。 #### fullUpdate() 當數據無效時調用此方法。 例如,用戶帳戶已被更改。 #### plUpdate(positionId, pl) 當代理商連接收到PL更新時調用此方法。 當`configFlags`中設置`supportPLUpdate`標志時,應使用此方法。 #### equityUpdate(equity) 當經紀商連接收到資產凈值時調用此方法。標準訂單對話框需要此方法。 #### tradeUpdate ([trade](Trading-Objects-and-Constants.html#trade)) 在添加或更改交易時調用此方法。 #### tradePartialUpdate ([trade](Trading-Objects-and-Constants.html#trade)) 交易未更改時調用此方法,但您添加到交易對象中以顯示在客戶經理中的字段將更改。 #### tradePLUpdate(tradeId, pl) 當代理連接收到交易PL更新時,請調用此方法。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看