Order Types
The rule builder separates the action type from the order type. Choose the action first, then configure the fields that belong to it:
- Place Order – Standard order types: Market, Limit, Stop, Stop-Limit, and Trailing Stop.
- Place Algo Order – Algorithmic execution: TWAP, VWAP, or Iceberg.
- Place Entry OCO Bracket – A paired entry action with two opposing resting entries and protective exits on each leg.
The sections below explain the standard order types and the settings for each action. Time-in-force settings apply to standard orders and to the parent legs of an entry OCO bracket.
Market order
Section titled “Market order”A market order executes immediately at the best available price.
How it works: Your order is sent to the exchange and filled at the current market price. There is no price guarantee – the actual fill price depends on liquidity and the bid-ask spread at the moment of execution.
When to use it:
- You want to enter or exit a position immediately.
- Speed of execution matters more than the exact fill price.
- The instrument is liquid (tight bid-ask spread) so the expected slippage is small.
Configuration in the rule builder:
- Order type: Market
- Side: Buy or Sell
- Quantity: Fixed number or an expression
Limit order
Section titled “Limit order”A limit order executes only at your specified price or better.
How it works: You set a maximum price you are willing to pay (for buys) or a minimum price you are willing to accept (for sells). The order sits in the order book until the market reaches your price – or it expires if the market never gets there.
When to use it:
- You want to control the exact price at which you enter or exit.
- You are willing to wait for the market to come to your price.
- You are entering at a support/resistance level and want to avoid chasing.
Configuration in the rule builder:
- Order type: Limit
- Side: Buy or Sell
- Quantity: Fixed number or an expression
- Limit price: A fixed price or an expression (for example,
price - 0.10to bid 10 cents below the current price)
Stop order
Section titled “Stop order”A stop order becomes a market order when price reaches your specified trigger level.
How it works: You set a stop price. When the market reaches that price, your stop order converts into a market order and executes at the best available price. This is commonly used for stop-loss exits and breakout entries.
When to use it:
- Stop-loss exits: Place a sell stop below your entry to limit losses if the market moves against you.
- Breakout entries: Place a buy stop above resistance to enter when price breaks through.
Configuration in the rule builder:
- Order type: Stop
- Side: Buy or Sell
- Quantity: Fixed number or an expression
- Stop price: A fixed price or an expression (for example,
vars.entryPrice - ATR(14) * 2for an ATR-based stop loss)
Stop-limit order
Section titled “Stop-limit order”A stop-limit order becomes a limit order (not a market order) when the stop price is reached.
How it works: You set two prices: a stop price (the trigger) and a limit price (the maximum you will pay or minimum you will accept). When the market reaches the stop price, a limit order is placed at your limit price. This gives you more control than a plain stop order but carries the risk of the order not filling if the market moves past your limit price too quickly.
When to use it:
- You want the protective qualities of a stop order but need more control over the execution price.
- You are trading in volatile markets where gap moves could cause unacceptable slippage on a plain stop order.
Configuration in the rule builder:
- Order type: Stop-Limit
- Side: Buy or Sell
- Quantity: Fixed number or an expression
- Stop price: The trigger level
- Limit price: The maximum buy price or minimum sell price (for example, set the stop at
150.00and the limit at150.50to allow up to 50 cents of slippage beyond the trigger)
Entry OCO bracket action
Section titled “Entry OCO bracket action”An entry OCO bracket is the Place Entry OCO Bracket action. It submits two opposing resting entry legs as one paired action, with a take-profit and stop-loss attached to each leg.
How it works: Each leg has a stop or stop-limit trigger, quantity, time-in-force, take-profit, and stop-loss. The legs must use opposite sides and equal quantities. When one leg fills, the remaining entry is canceled; the filled exposure keeps its own protective exits. OCO means “one cancels the other.”
When to use it:
- You want a two-sided breakout entry with built-in risk management.
- You want the first filled side to cancel the opposite entry automatically.
- You want each possible entry to have its own take-profit and stop-loss.
Configuration in the rule builder:
- Action: Place Entry OCO Bracket
- Two entry legs: Opposite sides, each using Stop or Stop-Limit
- Quantity: One equal positive quantity shared by both legs
- Entry prices: A stop trigger for each leg; Stop-Limit legs also have a limit price
- Take-profit and stop-loss: An expression for each leg that resolves to a quote-price level (for example,
order.entry_price * 1.03andorder.entry_price * 0.98) - Expiry and fill quota: Shared settings for the paired entries
For both fields, order.entry_price is the effective entry price of the submitted order. Fixed offsets are price units/points, not cash amounts or tick counts: order.entry_price + 40 adds 40 price points. To use ticks, multiply by the instrument’s minimum tick size. See Order-relative price levels for an ES example and the backtest engine’s tick normalization rules.
TWAP order (Time-Weighted Average Price)
Section titled “TWAP order (Time-Weighted Average Price)”A TWAP order breaks a large order into smaller slices spread evenly over a specified time window.
How it works: Instead of placing one large market order (which could move the price against you), the order is split into equal-sized child orders executed at regular intervals. The goal is to achieve an average fill price close to the time-weighted average price over the execution window.
When to use it:
- You are trading large quantities relative to the instrument’s average volume.
- You want to minimize the market impact of your order.
- You are executing a rebalance or portfolio adjustment over a set period.
Configuration in the rule builder:
- Action: Place Algo Order
- Algorithm type: TWAP
- Side: Buy or Sell
- Total quantity: The full amount you want to trade
- Duration: The time window over which to execute (for example, 30 minutes, 1 hour)
- Number of slices or interval: How frequently to send child orders
VWAP order (Volume-Weighted Average Price)
Section titled “VWAP order (Volume-Weighted Average Price)”A VWAP order distributes execution to match the market’s volume pattern, aiming for an average fill price close to the session’s VWAP.
How it works: Similar to TWAP, but instead of equal time slicing, the order sends more shares during high-volume periods and fewer during low-volume periods. This approach tends to reduce market impact because it trades in proportion to natural market activity.
When to use it:
- You want your average execution price to closely match the VWAP benchmark.
- You are making institutional-size trades and want to trade with the market’s natural rhythm.
- Your broker or compliance framework uses VWAP as a performance benchmark.
Configuration in the rule builder:
- Action: Place Algo Order
- Algorithm type: VWAP
- Side: Buy or Sell
- Total quantity: The full amount you want to trade
- Duration: The execution window
- Participation rate (optional): Maximum percentage of market volume your order should represent
Iceberg order
Section titled “Iceberg order”An iceberg order hides the full order size by only showing a small “visible” quantity to the market at a time.
How it works: You set a total order quantity and a display quantity. Only the display quantity appears in the order book. As each visible slice fills, a new one is automatically placed until the total quantity is complete.
When to use it:
- You are placing a large order and do not want other market participants to see the full size.
- You want to avoid signaling your intent to the market, which could cause price movement before you finish filling.
Configuration in the rule builder:
- Action: Place Algo Order
- Algorithm type: Iceberg
- Side: Buy or Sell
- Total quantity: The full amount you want to trade
- Display quantity: The amount visible in the order book at any given time (for example, show 100 shares at a time while filling a 5,000-share order)
- Limit price: The price limit for each visible slice
Time-in-force options
Section titled “Time-in-force options”Every order (except bracket child orders, which are managed automatically) has a time-in-force setting that determines how long the order remains active.
The order remains active until the end of the current trading session. If it has not been filled by the close, it is automatically canceled.
Best for: Intraday strategies, daily breakout entries, and orders you only want active for the current session.
GTC (Good Till Canceled)
Section titled “GTC (Good Till Canceled)”The order remains active indefinitely until it is filled or you explicitly cancel it. (Some brokers impose a maximum duration, such as 60 or 90 days.)
Best for: Swing trading entries at a specific price level, stop-loss orders that should persist across sessions.
IOC (Immediate or Cancel)
Section titled “IOC (Immediate or Cancel)”The order attempts to fill immediately. Whatever portion fills right away is executed; any unfilled remainder is canceled.
Best for: Situations where partial fills are acceptable but you do not want the unfilled portion sitting in the order book.
FOK (Fill or Kill)
Section titled “FOK (Fill or Kill)”The entire order must fill immediately and completely, or the entire order is canceled. No partial fills are allowed.
Best for: Situations where you need the full quantity or nothing – for example, when a partial fill would leave you with a position too small to be useful.
Choosing the right order type
Section titled “Choosing the right order type”| Situation | Recommended action and setting |
|---|---|
| Simple entry or exit, liquid instrument | Place Order → Market |
| Entry at a specific price, willing to wait | Place Order → Limit |
| Stop-loss exit | Place Order → Stop |
| Stop-loss with fill-price protection | Place Order → Stop-Limit |
| Two-sided breakout with automatic exits | Place Entry OCO Bracket |
| Large order, minimize market impact over time | Place Algo Order → TWAP or VWAP |
| Large order, hide total size from the market | Place Algo Order → Iceberg |
