# 委託別設定

如果你想要設定委託【範圍市價】，請參考下面的範例：

範圍市價是只有台灣才有，所以如果你要設定的話\
TimeInForce = tif\
OrderType = ordertype

查詢委託別設定表格，找出 一定範圍市價 + IOC\
OrderType = 25\
TimeInForce = 2

因此 AlertMessage 的 ordertype=25,tif=2

alertEntryMessage = "TOTC.{{timenow}}@account="+ ta +",sym="+ ts +",side={{strategy.order.action}},qty={{strategy.order.contracts}},p={{strategy.order.price}},ordertype=25,tif=2,ts={{timenow}},tvorderID="+ SN

{% hint style="warning" %}
&#x20;\* 請特別注意！你必須瞭解不同委託的搭配才能正確委託成功。

&#x20; \* 使用無法立即成交的委託方式可能造成快訊發送但不成交的狀況。

&#x20; \* 目前還沒有支持委託別的設定。
{% endhint %}

| 下單參數        | 設定值                                                                                                                                                                                                                                                                                                                                                                                                                                | 説明 |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -- |
| TimeInForce | <p>0:None</p><p>1:ROD Day order</p><p>2:IOC/FAK Immediate or Cancel/Fill and Kill</p><p>3:FOK Fill or Kill</p><p>4:GTC Good-Till-Cancel</p><p>5:GTD Good-Till-Date</p><p>6:OPG 盤前預約單</p>                                                                                                                                                                                                                                           |    |
| OrderType   | <p>1:Market order(MARKET)</p><p>2:Limit order(LIMIT)</p><p>3:Stop order(STOP)</p><p>4:Stop limit order(STPLMT)</p><p>5:Trailing Stop(TSTOP)</p><p>6:Trailing StopLimit(TSTPLMT)</p><p>7:Market if Touched Order(MIT)</p><p>8:Limit if Touched Order(LIT)</p><p>9:Trailing Limit(TLMT)</p><p>12:DOM-Triggered Stop(DTS)</p><p>13:DOM-Triggered Stop Limit(DTSL)</p><p>14:Breakeven(BE)</p><p>24:市價轉限價(MTL)</p><p>25:一定範圍市價(MWP)</p> |    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://touchance-1.gitbook.io/touchance/tradingview-kuai-xun-zi-dong-jiao-yi/zi-dong-jiao-yi/wei-tuo-bie-she-ding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
