Skip to main content
📈 Intermediateâąī¸ 60 minutes

OCO Exit Engine Deep Dive

Learn how to configure multi-level take-profits, trailing stops, and breakeven adjustments for maximum profitability.

What You'll Learn

  • ✓Understand how OCO (One-Cancels-Other) orders work
  • ✓Configure multi-level take-profit strategies
  • ✓Set optimal stop-loss levels
  • ✓Implement trailing stop strategies
  • ✓Use breakeven adjustment after first TP
  • ✓Set up time-based exits
  • ✓Master partial position scaling
  • ✓Apply real-world exit examples

What is the OCO Exit Engine?

OCO (One-Cancels-Other) is a sophisticated exit management system that monitors your positions in real-time and executes your exit strategy automatically. Instead of manually watching each trade, the OCO engine handles everything 24/7.

How It Works

  • Event-driven real-time monitoring (<50ms updates)
  • Tracks position P&L against your exit targets
  • Executes partial or full closes based on your rules
  • Adjusts stops to breakeven after hitting targets
  • Handles trailing stops as position moves in your favor
  • Logs all actions for performance analysis
â„šī¸

The OCO engine is 10-40x faster than polling-based systems, ensuring you never miss an exit level.

Module 1: How OCO Orders Work

Traditional OCO orders cancel one order when another fills. RelayDesk's OCO engine extends this concept:

  • Multiple take-profit levels (up to 3)
  • Each TP can close a different percentage of position
  • Stop loss protects entire position
  • Trailing stops activate after TPs fill
  • Breakeven adjustment after first TP hit
  • All orders work together as one strategy

Module 2: Configuring Take-Profit Levels

Take-profit levels let you scale out of positions progressively:

TP1 - First Profit Target

  • Typically set at +25-40% for options
  • Usually close 50% of position
  • Quick profit capture
  • Reduces overall position risk
  • Triggers breakeven adjustment

TP2 - Second Profit Target

  • Typically set at +50-75%
  • Close 50% of remaining (25% of original)
  • Locks in larger gains
  • Leaves runner for further upside

TP3 - Final Profit Target

  • Typically set at +100-150%
  • Close remaining position (or leave 25% as runner)
  • Maximum profit capture
  • Optional with trailing stop
✅

Popular setup: TP1 at +30% (close 50%), TP2 at +60% (close 50% of remaining), trailing stop for the rest.

Module 3: Setting Stop-Loss Orders

Stop losses protect your capital when trades go against you:

  • Set as percentage below entry price
  • Typical range: -20% to -40% for options
  • Tighter stops reduce max loss but increase stop-outs
  • Wider stops allow more room but risk more capital
  • Consider underlying volatility
  • Account for bid-ask spread
âš ī¸

Never trade without a stop loss. Hope is not a strategy.

Module 4: Trailing Stop Strategies

Trailing stops lock in gains as price moves in your favor:

Trail from Entry

Activates immediately from entry price, independent of take-profit levels. Good for trending markets.

  • Set trail distance: 10-20% typical
  • Stop follows price up automatically
  • If price drops by trail distance, position closes
  • Works well for breakout strategies

Trail After Final TP

Activates only after all take-profits fill. Lets winners run with protection.

  • Typical: 10-15% trail distance
  • Combines well with scaling out strategy
  • Maximum profit potential with downside protection
  • Popular for swing trading

Example

With 10% trail: If price reaches $5.00 after final TP, stop moves to $4.50. Price hits $6.00? Stop moves to $5.40. Price drops to $5.39? Position closes at $5.40 stop.

Module 5: Breakeven Adjustment After TP1

Move to Breakeven automatically adjusts your stop loss after first take-profit:

  • Triggers when TP1 is hit
  • Moves stop loss to entry price (0% loss)
  • Eliminates risk on remaining position
  • Guarantees break-even or better on trade
  • Can add small buffer (+2%) to lock in guaranteed profit
💡

This is the "free trade" setup. After TP1 hits, you're trading with the house's money.

Module 6: Time-Based Exits

Close positions after a set amount of time, regardless of profit/loss:

  • Useful for day trading strategies
  • Set specific close time (e.g., 3:45 PM)
  • Or set duration after entry (e.g., 30 minutes)
  • Overrides other exit conditions when triggered
  • Good for avoiding overnight exposure
  • Prevents holding losers too long

Module 7: Partial Position Scaling

Scaling out reduces risk while maintaining upside potential:

Benefits of Scaling Out

  • Locks in profits progressively
  • Reduces emotional stress
  • Lets winners run without full risk
  • Improves overall risk-reward ratio
  • More consistent profit-taking

Scaling Percentages

Common approaches:

  • Conservative: 50%, 30%, 20% (quick profit lock)
  • Balanced: 50%, 50% (half at each level)
  • Aggressive: 33%, 33%, 34% (equal scaling)
  • Runner: 50%, 25%, 25% (leave more for big moves)

Module 8: Real-World Exit Examples

Day Trading Setup

Fast in and out with tight stops:

  • TP1: +20% (close 50%)
  • TP2: +40% (close 50%)
  • Stop: -15%
  • Time stop: 30 minutes
  • Move to breakeven: After TP1

Swing Trading Setup

Hold for bigger moves with room to breathe:

  • TP1: +40% (close 50%)
  • TP2: +80% (close 25%)
  • TP3: +120% (close remaining 25%)
  • Stop: -30%
  • Trailing: 15% after TP3
  • Move to breakeven: After TP1

Breakout Strategy Setup

Let winners run with trailing from entry:

  • TP1: +50% (close 50%)
  • Trailing from entry: 20%
  • Stop: -25%
  • Move to breakeven: After TP1
✅

Test your exit strategy in paper mode for at least 2 weeks. Track actual vs expected results and adjust accordingly.

Key Takeaways

  • ●OCO engine monitors positions in real-time (<50ms)
  • ●Scaling out at multiple levels locks in profits progressively
  • ●Breakeven adjustment eliminates risk after first TP
  • ●Trailing stops let winners run while protecting gains
  • ●Time-based exits work well for day trading strategies
  • ●Partial position scaling reduces emotional decision-making
  • ●Proper exit strategy is as important as entry

Congratulations! 🎉

You've completed this tutorial. Mark it as complete to track your progress.