# Order Constructs

Also known as: OCO, bracket, trailing-stop order.
A Risk, Sizing & Exits concept (Orders & execution) in the LuxAlgo Library, with 1 indicator implementation.

## What are Order Constructs?

Order constructs are composite orders: arrangements of two or more basic [order types](https://www.luxalgo.com/library/concept/order-types/) linked by management logic. The workhorses are OCO (one-cancels-the-other, two resting orders linked so the first fill cancels the sibling), the bracket (an entry that, once filled, automatically places a stop loss and a profit target as an OCO pair), and the trailing-stop order (a stop whose trigger ratchets along with favorable price movement at a fixed distance).

OCO predates electronic trading: it began as a contingent instruction left with a broker, who canceled the surviving order when its sibling filled. Electronic platforms encoded that linkage into the venue itself, and OCO and bracket functionality is now standard across futures, forex, stock, and crypto platforms, though the names vary (bracket, OTOCO, attached orders) and, more importantly, so does where the logic runs.

Their value is that the exit plan can live at the broker or exchange rather than in the trader's attention span: once a bracket is working server-side, the position stays protected even if the platform is closed. That matters most for rule-based trading, because [loss-control rules](https://www.luxalgo.com/library/concept/loss-control-rules/) only bind if the stop actually exists in the market; a bracket makes its existence automatic instead of a decision revisited under stress.

The caveat is that implementations differ by venue. Some constructs are native to the exchange matching engine, others are simulated client-side or by an execution bridge; partial fills, gaps through stop prices, and whether a trailing offset updates server-side all vary, so the construct's fine print is part of the risk plan.

## How to set up a bracket order

Constructs are execution plumbing rather than a chart pattern, so the practical skill is configuring one correctly rather than spotting it on a chart.

1. Define the risk unit first: pick the stop location, whether a [structure stop](https://www.luxalgo.com/library/concept/structure-stop/) beyond the invalidating swing or a [volatility stop](https://www.luxalgo.com/library/concept/volatility-stop/) at a multiple of average true range.
2. Size the position from that stop distance so the loss at the stop equals the planned fraction of equity, per [fixed fractional](https://www.luxalgo.com/library/concept/fixed-fractional/) sizing or whichever sizing basis the plan uses.
3. Enter the bracket as one ticket: entry plus attached stop and profit target, expressed as absolute prices or as offsets from the fill.
4. Confirm the linkage settings: the stop and target must be OCO-linked, and quantity adjustments on partial fills should propagate to both legs.
5. Check where each leg lives. A venue-native bracket keeps working when your platform disconnects; a locally simulated one does not, which changes what a hard stop actually protects against.

## How traders use it

- As brackets on entry: every fill is born with a linked stop and target, sized so the stop distance equals one R in the plan's [R-multiple framework](https://www.luxalgo.com/library/concept/r-multiple-framework/), and the OCO linkage cancels the remaining leg when one side fills.
- In webhook automation: strategy alerts fire into an execution bridge that translates each signal into a bracket or OCO at the venue, so automated systems get exchange-side protection instead of depending on the next alert arriving.
- As server-side trailing: a trailing-stop order implements the simplest [trailing method](https://www.luxalgo.com/library/concept/trailing-method-taxonomy/) (a fixed offset) without indicator logic; systems that trail on structure or volatility instead recompute the level and amend a plain stop order.
- For staged exits: [scaling out](https://www.luxalgo.com/library/concept/scaling-out/) becomes multiple target legs, each OCO-linked to the shared stop, often with the stop moved to breakeven once the first target fills; the [profit target taxonomy](https://www.luxalgo.com/library/concept/profit-target-taxonomy/) covers how the target prices are chosen.
- When [pyramiding](https://www.luxalgo.com/library/concept/pyramiding/): each add-on entry carries its own bracket, or the position's single stop is amended as units are added, so the combined position never sits without a resting exit.

## Order Constructs vs related building blocks

- **Order Types** (https://www.luxalgo.com/library/concept/order-types/): Order types are the atoms: market, limit, stop, stop-limit, each a single instruction. Order constructs are molecules, two or more of those atoms linked by cancel-and-replace logic. A venue can only offer constructs built from the types it supports.
- **Trailing Method Taxonomy** (https://www.luxalgo.com/library/concept/trailing-method-taxonomy/): The trailing-stop order is one entry in the broader taxonomy of trailing methods: a fixed-distance ratchet the venue can run by itself. Methods that trail structure, moving averages, or volatility bands need indicator logic, so they are implemented by amending a plain stop rather than by a native order.
- **Fixed Stops** (https://www.luxalgo.com/library/concept/fixed-stops/): A fixed stop is a placement decision: where the exit belongs and that it stays put. A bracket is the delivery mechanism that makes sure the stop exists from the moment of fill. One answers where, the other answers how it gets into the market.

## FAQ

### What is the difference between an OCO and a bracket order?

An OCO is the linkage primitive: two live orders where the first fill cancels the other, typically a stop and a target protecting an existing position. A bracket is the full package: an entry order that, when it fills, automatically spawns that stop-and-target OCO pair. Every bracket contains an OCO; an OCO on its own assumes the position already exists.

### Are trailing-stop orders executed on the exchange or by my broker?

It depends on the venue. Some exchanges support native trailing stops that ratchet inside the matching engine; many brokers and bridges simulate them client-side, amending a plain stop as price moves. The difference matters during disconnects and fast markets: a simulated trail stops updating if the software goes offline, while a native one keeps working. Check the venue's documentation before relying on either.

### What happens to a bracket order on a partial fill?

On well-implemented venues the protective legs are created for the filled quantity and adjusted as more of the entry executes. Implementations differ, though: some platforms only spawn the exit legs once the entry completes, which can leave a partial position briefly unprotected. This is exactly the fine print worth testing with small size before automating.

### Do OCO and bracket orders work on crypto exchanges?

Many large crypto venues support OCO natively on spot, and many derivatives venues offer attached take-profit and stop-loss orders that amount to a bracket. Coverage is uneven across venues and order subtypes, and execution bridges often simulate whatever the exchange lacks, so the practical answer depends on the specific pairing of venue and software.

### Can I change the stop or target after a bracket is placed?

Yes. The legs are live orders and can be amended like any other, which is how moving a stop to breakeven or trailing it behind structure is done in practice. The OCO linkage normally survives an amendment. Canceling a leg outright is different: venues vary between canceling the whole pair and leaving the survivor working unlinked, so check the platform's behavior before pulling one side.

## Implementations in the Library

- Order Constructs (LuxAlgo): https://www.luxalgo.com/library/indicator/order-constructs/

## Related concepts

- Order Types: https://www.luxalgo.com/library/concept/order-types/
- TWAP/VWAP/POV Execution: https://www.luxalgo.com/library/concept/twap-vwap-pov-execution/
- Execution Cost Modeling: https://www.luxalgo.com/library/concept/execution-cost-modeling/
- Exchange Order Flags: https://www.luxalgo.com/library/concept/exchange-order-flags/

---

Source: https://www.luxalgo.com/library/concept/order-constructs/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/