Order Types¶
Difficulty beginner
Overview¶
Order types determine how your trade is executed. Choosing the right order type is as important as choosing the right direction — a good idea executed poorly can become a losing trade.
Primary Order Types¶
Market Orders¶
Definition: Execute immediately at the best available price.
Pros: - Guaranteed execution - Immediate - Simple
Cons: - No price guarantee - Slippage in illiquid markets - Can be exploited by HFTs (latency arbitrage)
When to Use: - Highly liquid markets - When execution certainty matters more than price - Emergency exits
When to Avoid: - Low liquidity securities - During market open/close (volatility) - Around news events
Limit Orders¶
Definition: Execute only at specified price or better.
Pros: - Price guarantee - Can earn rebates (maker orders) - Control execution cost
Cons: - No execution guarantee - May miss the move - Queue priority matters
When to Use: - Always for illiquid securities - When price matters more than execution certainty - In range-bound markets
When to Avoid: - Fast-moving markets (order won't fill) - When you must exit a position
Stop Orders¶
Definition: Becomes a market order once stop price is reached.
Stop-Loss (Sell Stop):
Stop-Entry (Buy Stop):
Pros: - Automatic protection - No need to monitor constantly - Good for breakout strategies
Cons: - Stop hunting (price triggers stop then reverses) - Slippage on execution - Gap risk (overnight moves past stop)
Python Example:
Stop-Limit Orders¶
Definition: Becomes a limit order once stop price is reached.
Current Price: $100
Stop Price: $95
Limit Price: $94.50
If price hits $95 → Places limit order at $94.50
Pros: - Price protection after trigger - Avoids extreme slippage
Cons: - May not fill at all (gap through limit) - You're left with the position
Advanced Order Types¶
Trailing Stop¶
Definition: Stop price moves with the market, maintaining a fixed distance.
Iceberg Orders¶
Definition: Large order displayed in small visible portions.
Total Order: 10,000 shares
Display Size: 1,000 shares
Book Shows: 1,000 shares (refills after each fill)
Use Case: Large institutional orders to minimize market impact.
Time-in-Force (TIF) Orders¶
| TIF Type | Behavior |
|---|---|
| Day | Cancels at end of trading session |
| GTC (Good Till Canceled) | Stays active until filled or manually canceled |
| IOC (Immediate or Cancel) | Fills what it can immediately, cancels rest |
| FOK (Fill or Kill) | Must fill entirely immediately, or cancels entirely |
| GTD (Good Till Date) | Active until specified date |
Conditional Orders¶
One-Cancels-Other (OCO):
Order 1: Take profit at $110 (limit sell)
Order 2: Stop loss at $95 (stop sell)
If either fills, the other is canceled
One-Triggers-Other (OTO):
Order 1: Buy at $100
If filled → automatically place:
Order 2: Stop loss at $95
Order 3: Take profit at $110
One-Triggers-One-Cancels-Other (OTOCO):
Entry: Buy stop at $105
If filled → simultaneously place:
Take profit at $115
Stop loss at $98
(TP and SL are OCO)
VWAP/TWAP Orders¶
VWAP (Volume Weighted Average Price):
TWAP (Time Weighted Average Price): - Split order into equal parts over time - Execute at regular intervals - Reduces market impact
Order Execution Priority¶
Queue Priority (Price-Time)¶
At price $100.00:
1. Order A: 500 shares @ 10:00:01.000 ← First
2. Order B: 200 shares @ 10:00:01.150 ← Second
3. Order C: 1000 shares @ 10:00:02.000 ← Third
4. Hidden Order D: 300 shares @ 10:00:00.500 ← Hidden (behind displayed)
A buy market order for 600 shares:
- Fills 500 from A (Order A complete)
- Fills 100 from B (100 shares remaining in Order B)
Rebate Structure¶
| Order Type | Pays/Receives | Typical Rate |
|---|---|---|
| Maker (adds liquidity) | Receives rebate | $0.0020-0.0030/share |
| Taker (removes liquidity) | Pays fee | $0.0025-0.0035/share |
Implication: High-frequency strategies often profit from rebates alone.
Order Selection Decision Tree¶
Do you need guaranteed execution?
├── Yes → Market Order
│ └── Is liquidity low?
│ ├── Yes → Expect significant slippage
│ └── No → Good choice
│
└── No → Limit Order
└── Do you want to provide liquidity?
├── Yes → Post limit order away from NBBO
└── No → Aggressive limit at/near NBBO
Do you need to protect a position?
├── Yes → Stop Order
│ └── Is gap risk a concern?
│ ├── Yes → Stop-Limit (accept non-fill risk)
│ └── No → Regular Stop (guaranteed exit)
│
└── No → Evaluate other types
Is this a large order?
├── Yes → Use algorithmic execution (VWAP, TWAP, Iceberg)
│
└── No → Standard order types sufficient
Slippage¶
Definition¶
Difference between expected execution price and actual fill price.
Slippage Components¶
| Component | Description | Mitigation |
|---|---|---|
| Spread | Bid-ask spread cost | Use limit orders |
| Impact | Your order moves the market | Use algos, trade patiently |
| Timing | Market moves while order routes | Faster execution, co-location |
| Latency | Network/processing delay | Better infrastructure |
Common Mistakes¶
| Mistake | Consequence | Fix |
|---|---|---|
| Market orders in illiquid stocks | Severe slippage | Always use limits |
| Stops too tight | Whipsawed out | Use ATR-based stops |
| Stops at round numbers | Stop hunting | Place stops below support |
| Limit too far from market | Never fills | Be realistic about price |
| Ignoring time-in-force | Stale orders execute | Set appropriate TIF |
| Not using OCO | Double risk exposure | Always bracket trades |
Best Practices¶
- Always Use Limits — Unless execution certainty is paramount
- Avoid Market Orders at Open — First 5 minutes are chaotic
- Size Matters — Large orders need algorithmic execution
- Check Liquidity — Look at depth before placing orders
- Use Brackets — Entry + stop + target as OCO/OTO
- Monitor Partial Fills — Large orders may fill in pieces
- Understand Rebates — Maker-taker affects cost basis
Next Steps¶
- Bid-Ask Spread — Transaction cost analysis
- Liquidity & Depth — Reading the order book
- Order Types in Practice — Algorithmic execution