Skip to main content
Skip to main content
Version: Next 🚧

How to Setup Partial Exits

Problem

You want to lock in profits at multiple levels while keeping part of your position open for larger moves. Taking full profit too early leaves money on the table, while holding too long risks giving back gains. Partial exits (scaling out) provide a balanced approach.

Prerequisites

  • Basic algorithm configuration completed
  • Exit conditions configured (Step 4)
  • Understanding of take profit concepts

What are Partial Exits?

Partial exits allow you to close portions of your position at different profit levels, creating a "ladder" exit strategy. This approach:

  • Locks in some profit early (reduces risk)
  • Keeps some position open for larger moves (maximizes potential)
  • Reduces emotional decision-making
  • Provides consistent profit-taking discipline

Example:

Entry: 100 shares at ₹500
Target 1: Exit 33 shares at 2% profit (₹510)
Target 2: Exit 33 shares at 4% profit (₹520)
Target 3: Exit 34 shares at 6% profit (₹530)

Basic Configuration

Simple Two-Target Setup

{
"exitConditions": {
"partialExits": {
"enabled": true,
"targets": [
{
"profitPercentage": 2.0,
"exitPercentage": 50
},
{
"profitPercentage": 4.0,
"exitPercentage": 50
}
]
}
}
}

How It Works:

  1. At 2% profit: Exit 50% of position
  2. At 4% profit: Exit remaining 50%

Three-Target Setup

{
"exitConditions": {
"partialExits": {
"enabled": true,
"targets": [
{
"profitPercentage": 2.0,
"exitPercentage": 33
},
{
"profitPercentage": 4.0,
"exitPercentage": 33
},
{
"profitPercentage": 6.0,
"exitPercentage": 34
}
]
}
}
}

How It Works:

  1. At 2% profit: Exit 33% of position
  2. At 4% profit: Exit 33% of position
  3. At 6% profit: Exit remaining 34%

Ladder Exit Strategy

What is a Ladder Exit?

A ladder exit is a systematic approach to scaling out of positions at predetermined profit levels. Think of it as climbing down a ladder - you take steps at regular intervals.

Example: 100 Share Position

Entry: 100 shares at ₹500 (₹50,000 total)

Target 1: 2% profit (₹510)
- Exit: 33 shares
- Proceeds: ₹16,830
- Remaining: 67 shares

Target 2: 4% profit (₹520)
- Exit: 33 shares
- Proceeds: ₹17,160
- Remaining: 34 shares

Target 3: 6% profit (₹530)
- Exit: 34 shares
- Proceeds: ₹18,020
- Remaining: 0 shares

Total Proceeds: ₹52,010
Total Profit: ₹2,010 (4.02%)
Average Exit: ₹520.10

Comparison: Full Exit vs Partial Exits

Scenario: Price reaches ₹530 then reverses to ₹505

Full Exit at 2%:

Exit all 100 shares at ₹510
Profit: ₹1,000 (2%)

Full Exit at 6%:

Exit all 100 shares at ₹530
Profit: ₹3,000 (6%)

Partial Exits (33/33/34):

Exit 33 at ₹510: ₹330 profit
Exit 33 at ₹520: ₹660 profit
Exit 34 at ₹530: ₹1,020 profit
Total: ₹2,010 profit (4.02%)

Partial exits provide:

  • Better than early full exit (4.02% vs 2%)
  • Less risk than waiting for full 6%
  • Guaranteed profit even if price reverses

Profit Targets Configuration

Setting Profit Percentages

{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 33 },
{ "profitPercentage": 4.0, "exitPercentage": 33 },
{ "profitPercentage": 6.0, "exitPercentage": 34 }
]
}

Guidelines for Profit Targets:

Scalping (1-5 minute timeframes):

{
"targets": [
{ "profitPercentage": 0.5, "exitPercentage": 50 },
{ "profitPercentage": 1.0, "exitPercentage": 50 }
]
}

Day Trading (5-30 minute timeframes):

{
"targets": [
{ "profitPercentage": 1.5, "exitPercentage": 33 },
{ "profitPercentage": 3.0, "exitPercentage": 33 },
{ "profitPercentage": 4.5, "exitPercentage": 34 }
]
}

Swing Trading (1-4 hour timeframes):

{
"targets": [
{ "profitPercentage": 3.0, "exitPercentage": 33 },
{ "profitPercentage": 6.0, "exitPercentage": 33 },
{ "profitPercentage": 9.0, "exitPercentage": 34 }
]
}

Position Trading (daily timeframes):

{
"targets": [
{ "profitPercentage": 5.0, "exitPercentage": 25 },
{ "profitPercentage": 10.0, "exitPercentage": 25 },
{ "profitPercentage": 15.0, "exitPercentage": 25 },
{ "profitPercentage": 20.0, "exitPercentage": 25 }
]
}

Exit Percentages

The exit percentages must add up to 100%:

Equal Distribution:

{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 33 },
{ "profitPercentage": 4.0, "exitPercentage": 33 },
{ "profitPercentage": 6.0, "exitPercentage": 34 }
]
}

Front-Loaded (lock in more early):

{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 50 },
{ "profitPercentage": 4.0, "exitPercentage": 30 },
{ "profitPercentage": 6.0, "exitPercentage": 20 }
]
}

Back-Loaded (let more run):

{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 20 },
{ "profitPercentage": 4.0, "exitPercentage": 30 },
{ "profitPercentage": 6.0, "exitPercentage": 50 }
]
}

Move Stop to Entry Feature

What is Move Stop to Entry?

After hitting the first profit target, you can automatically move your stop loss to the entry price, creating a "risk-free" trade for the remaining position.

Configuration

{
"exitConditions": {
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 50 }
],
"moveStopToEntry": true
}
}
}

How It Works

Entry: ₹500
Initial Stop Loss: ₹490 (2% stop)
Position: 100 shares

Price reaches ₹510 (2% profit):
1. Exit 50 shares at ₹510
2. Move stop to ₹500 (entry price)
3. Remaining 50 shares are now risk-free

Worst case: Stop triggers at ₹500
- First 50 shares: +₹500 profit
- Last 50 shares: ₹0 profit/loss
- Total: +₹500 profit (1% overall)

Best case: Price continues to ₹530
- First 50 shares: +₹500 profit (at ₹510)
- Last 50 shares: +₹1,500 profit (at ₹530)
- Total: +₹2,000 profit (4%)

Benefits

  1. Eliminates risk - Can't lose on the trade after first target
  2. Psychological comfort - Easier to hold remaining position
  3. Lets winners run - No pressure to exit early
  4. Protects against reversals - Guaranteed profit even if price crashes

With Offset

Add a small buffer to protect against slippage:

{
"partialExits": {
"moveStopToEntry": true,
"entryOffset": 0.1 // 0.1% above entry
}
}
Entry: ₹500
After first target: Move stop to ₹500.50 (0.1% above entry)

Hit Targets Tracking

How Targets are Tracked

The system tracks which targets have been hit using the hitTargets array:

{
"hitTargets": [0, 1] // Targets 0 and 1 have been hit
}

Example Execution Flow

Initial Position: 100 shares at ₹500
Targets: [2%, 4%, 6%] with [33%, 33%, 34%]
hitTargets: []

Price reaches ₹510 (2% profit):
- Execute Target 0: Exit 33 shares
- hitTargets: [0]
- Remaining: 67 shares

Price reaches ₹520 (4% profit):
- Execute Target 1: Exit 33 shares
- hitTargets: [0, 1]
- Remaining: 34 shares

Price reaches ₹530 (6% profit):
- Execute Target 2: Exit 34 shares
- hitTargets: [0, 1, 2]
- Remaining: 0 shares
- Position closed

Partial Target Hits

If price reverses before hitting all targets:

Position: 100 shares at ₹500
Targets: [2%, 4%, 6%]

Price reaches ₹510, then reverses to ₹495:
- Target 0 hit: Exited 33 shares at ₹510
- Targets 1, 2 not hit
- Remaining 67 shares stopped out at ₹490
- Result: Mixed (some profit, some loss)

Remaining Position Management

After Partial Exits

The remaining position continues to be managed by other exit conditions:

{
"exitConditions": {
"stopLoss": {
"enabled": true,
"type": "percentage",
"percentage": 2.0
},
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 50 }
],
"moveStopToEntry": true
},
"trailingStop": {
"enabled": true,
"type": "percentage",
"trailPercentage": 3.0,
"activationThreshold": 1.0
}
}
}

Execution Flow:

  1. Initial stop loss: 2% below entry
  2. At 2% profit: Exit 50%, move stop to entry
  3. Remaining 50%: Managed by trailing stop
  4. Trailing stop locks in additional profits

Position Size Reduction

After each partial exit, the position size decreases:

Initial: 100 shares

After Target 1 (33% exit):
Remaining: 67 shares
All exit conditions now apply to 67 shares

After Target 2 (33% exit):
Remaining: 34 shares
All exit conditions now apply to 34 shares

Complete Configuration Examples

Example 1: Conservative Scalping

{
"name": "Conservative Scalping",
"exitConditions": {
"stopLoss": {
"enabled": true,
"type": "percentage",
"percentage": 0.5
},
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 0.3, "exitPercentage": 50 },
{ "profitPercentage": 0.6, "exitPercentage": 50 }
],
"moveStopToEntry": true
}
}
}

Strategy:

  • Very tight stop (0.5%)
  • Quick partial exits (0.3%, 0.6%)
  • Move to breakeven after first target
  • Good for: High-frequency scalping

Example 2: Aggressive Day Trading

{
"name": "Aggressive Day Trading",
"exitConditions": {
"stopLoss": {
"enabled": true,
"type": "percentage",
"percentage": 2.0
},
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 25 },
{ "profitPercentage": 4.0, "exitPercentage": 25 }
],
"moveStopToEntry": true
},
"trailingStop": {
"enabled": true,
"type": "percentage",
"trailPercentage": 2.5,
"activationThreshold": 1.5
}
}
}

Strategy:

  • Exit only 50% at targets (let 50% run)
  • Remaining 50% managed by trailing stop
  • Move to breakeven after first target
  • Good for: Capturing larger intraday moves

Example 3: Swing Trading with Four Targets

{
"name": "Swing Trading Ladder",
"exitConditions": {
"stopLoss": {
"enabled": true,
"type": "percentage",
"percentage": 3.0
},
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 3.0, "exitPercentage": 25 },
{ "profitPercentage": 6.0, "exitPercentage": 25 },
{ "profitPercentage": 9.0, "exitPercentage": 25 },
{ "profitPercentage": 12.0, "exitPercentage": 25 }
],
"moveStopToEntry": true,
"entryOffset": 0.2
}
}
}

Strategy:

  • Equal 25% exits at each target
  • Four profit levels for gradual scaling
  • Move to breakeven + 0.2% after first target
  • Good for: Multi-day swing trades

Example 4: Position Trading with Trailing

{
"name": "Position Trading",
"exitConditions": {
"stopLoss": {
"enabled": true,
"type": "atr",
"atrPeriod": 14,
"atrMultiplier": 2.0
},
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 5.0, "exitPercentage": 33 },
{ "profitPercentage": 10.0, "exitPercentage": 33 }
],
"moveStopToEntry": true
},
"trailingStop": {
"enabled": true,
"type": "atr",
"atrPeriod": 14,
"atrMultiplier": 3.0,
"activationThreshold": 3.0
}
}
}

Strategy:

  • ATR-based stops adapt to volatility
  • Exit 66% at fixed targets
  • Remaining 34% managed by wide trailing stop
  • Good for: Long-term trend following

Example 5: Risk-Free Runner

{
"name": "Risk-Free Runner",
"exitConditions": {
"stopLoss": {
"enabled": true,
"type": "percentage",
"percentage": 2.0
},
"partialExits": {
"enabled": true,
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 50 }
],
"moveStopToEntry": true
},
"trailingStop": {
"enabled": true,
"type": "percentage",
"trailPercentage": 4.0,
"activationThreshold": 1.0
}
}
}

Strategy:

  • Exit 50% at 2% (1:1 risk-reward)
  • Move stop to entry (risk-free)
  • Let remaining 50% run with trailing stop
  • No maximum profit target
  • Good for: Trend following with protection

Multi-Target Exit Examples

Example: 100 Share Position

Entry: 100 shares at ₹500 (₹50,000)
Stop Loss: ₹490 (2%)
Targets: 2%, 4%, 6% with 33%, 33%, 34%

Scenario 1: All Targets Hit
₹500 → ₹510 → ₹520 → ₹530

Target 1 (₹510): Exit 33 shares = ₹16,830
Target 2 (₹520): Exit 33 shares = ₹17,160
Target 3 (₹530): Exit 34 shares = ₹18,020
Total: ₹52,010 (₹2,010 profit, 4.02%)

Scenario 2: Only First Target Hit
₹500 → ₹510 → ₹495 → Stop at ₹490

Target 1 (₹510): Exit 33 shares = ₹16,830 (+₹330)
Stop (₹490): Exit 67 shares = ₹32,830 (-₹670)
Total: ₹49,660 (-₹340 loss, -0.68%)

Scenario 3: Two Targets Hit
₹500 → ₹510 → ₹520 → ₹505 → Stop at ₹500

Target 1 (₹510): Exit 33 shares = ₹16,830 (+₹330)
Target 2 (₹520): Exit 33 shares = ₹17,160 (+₹660)
Stop (₹500): Exit 34 shares = ₹17,000 (₹0)
Total: ₹51,000 (+₹990 profit, 1.98%)

Calculating Average Exit Price

Average Exit = (Target1_Shares × Target1_Price + 
Target2_Shares × Target2_Price +
Target3_Shares × Target3_Price) / Total_Shares

Example:

33 shares at ₹510 = ₹16,830
33 shares at ₹520 = ₹17,160
34 shares at ₹530 = ₹18,020
Total: 100 shares = ₹52,010

Average Exit = ₹52,010 / 100 = ₹520.10

Verification

After configuring partial exits, verify:

  1. Exit percentages add up to 100%

    33% + 33% + 34% = 100% ✓
  2. Profit targets are in ascending order

    2% < 4% < 6% ✓
  3. Targets are realistic for your timeframe

    • Scalping: 0.3%, 0.6%, 1.0%
    • Day trading: 1.5%, 3.0%, 4.5%
    • Swing trading: 3%, 6%, 9%
  4. First target is achievable

    • Should be hit frequently (60%+ of trades)
    • If rarely hit, reduce first target
  5. Move stop to entry makes sense

    • Only enable if first target is reliable
    • Consider adding offset for slippage

Troubleshooting

First Target Never Hit

Problem: Price rarely reaches first profit target.

Solution:

  • Reduce first target percentage
  • Check if stop loss is too tight
  • Verify strategy generates profitable trades
{
"targets": [
{ "profitPercentage": 1.0, "exitPercentage": 50 } // Reduced from 2.0
]
}

Too Many Targets

Problem: Price rarely hits later targets.

Solution:

  • Reduce number of targets
  • Widen spacing between targets
  • Use trailing stop for remaining position
{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 50 },
{ "profitPercentage": 4.0, "exitPercentage": 50 }
]
// Removed third target
}

Exit Percentages Don't Add Up

Problem: Configuration error - percentages must equal 100%.

Solution:

{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 33 },
{ "profitPercentage": 4.0, "exitPercentage": 33 },
{ "profitPercentage": 6.0, "exitPercentage": 34 } // 33+33+34=100
]
}

Stop Moved Too Early

Problem: Stop moved to entry before first target is secure.

Solution:

  • Disable moveStopToEntry
  • Or add larger entryOffset
{
"partialExits": {
"moveStopToEntry": true,
"entryOffset": 0.5 // Increased from 0.1
}
}

Lot Size Issues (Futures/Options)

Problem: Partial exits don't respect lot sizes.

Solution:

  • Ensure exit percentages result in whole lots
  • For NIFTY (lot size 50):
    • 50% of 100 shares = 50 shares (1 lot) ✓
    • 33% of 100 shares = 33 shares (not whole lot) ✗
{
"targets": [
{ "profitPercentage": 2.0, "exitPercentage": 50 }, // 50 shares = 1 lot
{ "profitPercentage": 4.0, "exitPercentage": 50 } // 50 shares = 1 lot
]
}

Best Practices

  1. Start with two targets

    • Simpler to manage
    • Easier to optimize
    • Add more targets later if needed
  2. Make first target achievable

    • Should hit 60-70% of the time
    • Provides psychological wins
    • Reduces risk quickly
  3. Use equal or front-loaded distribution

    • Lock in more profit early
    • Reduces risk of giving back gains
    • Let smaller portion run for big moves
  4. Enable move stop to entry

    • Creates risk-free trades
    • Reduces stress
    • Allows holding remaining position longer
  5. Combine with trailing stops

    • Partial exits for fixed targets
    • Trailing stop for remaining position
    • Best of both worlds
  6. Match targets to timeframe

    • Shorter timeframes = smaller targets
    • Longer timeframes = larger targets
    • Consider average move size
  7. Test in paper trading

    • Verify targets are hit
    • Check average exit price
    • Optimize based on results
  8. Consider transaction costs

    • Multiple exits = multiple commissions
    • Ensure profit targets cover costs
    • May not be suitable for very small accounts