Advanced Orders - Loren1166/NautilusTrader- GitHub Wiki
The following guide should be read in conjunction with the specific documentation from the broker or exchange involving these order types, lists/groups and execution instructions (such as for Interactive Brokers).
以下指南应与经纪商或交易所涉及这些订单类型、列表/组和执行指令(例如 Interactive Brokers)的特定文档结合阅读。
Combinations of contingent orders, or larger order bulks can be grouped together into a list with a common
order_list_id
. The orders contained in this list may or may not have a contingent relationship with each other, as this is specific to how the orders themselves are constructed, and the specific exchange they are being routed to.附带订单的组合或较大的订单批量可以分组到一个具有共同
order_list_id
的列表中。此列表中包含的订单可能彼此之间存在也可能不存在附带关系,因为这特定于订单本身的构建方式以及它们被路由到的特定交易所。
- OTO are parent orders with 'one-triggers-other' child orders. OTO 是具有“一个触发另一个”子订单的父订单。
- OCO are linked orders with
linked_order_ids
which are contingent on the other(s) (one-cancels-other when triggered). OCO 是具有linked_order_ids
的链接订单,这些订单取决于其他订单(触发时一个取消另一个)。- OUO are linked orders with
linked_order_ids
which are contingent on the other(s) (one-updates-other when triggered or modified). OUO 是具有linked_order_ids
的链接订单,这些订单取决于其他订单(触发或修改时一个更新另一个)。
These contingency types relate to ContingencyType FIX tag <1385> https://www.onixs.biz/fix-dictionary/5.0.sp2/tagnum_1385.html.
这些附带类型与 ContingencyType FIX 标签 <1385> 相关:https://www.onixs.biz/fix-dictionary/5.0.sp2/tagnum_1385.html。
An OTO orders involves two orders—a parent order and a child order. The parent order is a live marketplace order. The child order, held in a separate order file, is not. If the parent order executes in full, the child order is released to the marketplace and becomes live. An OTO order can be made up of stock orders, option orders, or a combination of both.
OTO 订单涉及两个订单——父订单和子订单。父订单是一个实时市场订单。子订单保存在单独的订单文件中,它不是实时市场订单。如果父订单完全执行,子订单将发布到市场并变为实时市场订单。OTO 订单可以由股票订单、期权订单或两者的组合组成。
An OCO order is an order whose execution results in the immediate cancellation of another order linked to it. Cancellation of the Contingent Order happens on a best efforts basis. In an OCO order, both orders are live in the marketplace at the same time. The execution of either order triggers an attempt to cancel the other unexecuted order. Partial executions will also trigger an attempt to cancel the other order.
OCO 订单是指其执行会导致立即取消与其链接的另一个订单的订单。附带订单的取消是在尽力而为的基础上进行的。在 OCO 订单中,两个订单同时在市场上处于活动状态。任一订单的执行都会触发尝试取消另一个未执行订单的操作。部分执行也会触发尝试取消另一个订单的操作。
An OUO order is an order whose execution results in the immediate reduction of quantity in another order linked to it. The quantity reduction happens on a best effort basis. In an OUO order both orders are live in the marketplace at the same time. The execution of either order triggers an attempt to reduce the remaining quantity of the other order, partial executions included.
OUO 订单是指其执行会导致立即减少与其链接的另一个订单中的数量的订单。数量减少是在尽力而为的基础上进行的。在 OUO 订单中,两个订单同时在市场上处于活动状态。任一订单的执行都会触发尝试减少另一个订单剩余数量的操作,包括部分执行。
Bracket orders are an advanced order type that allows traders to set both take-profit and stop-loss levels for a position simultaneously. This involves placing a parent order (entry order) and two child orders: a take-profit
LIMIT
order and a stop-lossSTOP_MARKET
order. When the parent order is executed, the child orders are placed in the market. The take-profit order closes the position with profits if the market moves favorably, while the stop-loss order limits losses if the market moves unfavorably.括号订单是一种高级订单类型,允许交易者同时为头寸设置止盈和止损水平。这涉及 placing a 父订单(入场订单)和两个子订单:一个止盈
LIMIT
订单和一个止损STOP_MARKET
订单。当父订单执行时,子订单将被 placing 在市场上。如果市场走势有利,止盈订单将以利润平仓;如果市场走势不利,止损订单将限制损失。
Bracket orders can be easily created using the
OrderFactory
, which supports various order types, parameters, and instructions.可以使用
OrderFactory
轻松创建括号订单,它支持各种订单类型、参数和指令。
You should be aware of the margin requirements of positions, as bracketing a position will consume more order margin.
您应该注意头寸的保证金要求,因为括号订单会消耗更多的订单保证金。