What is partial take profit and how does it work?

Partial Take Profit (Partial TP) in MagicTradeBot is a feature that allows the bot to sell only a portion of your open position once a profit target is reached, instead of closing the entire trade at once. This helps you lock in profits gradually while keeping part of the position open to capture additional gains if the market continues to move favorably.


๐Ÿง  How Partial Take Profit Works

  1. Sell Percentage (SellPer)

    • Defines the portion of your position to close when the TP target is reached.
    • Example:

      SellPer: 40
      

      โ†’ Sell 40% of the total position.

  2. Calculation of Quantity

    • If DCA (Dollar-Cost Averaging) is enabled:

      • Partial TP is applied to the combined total of all DCA orders for that trade.
    • If DCA is disabled:

      • Partial TP is applied to the original trade quantity only.
  3. Multiple Partial TP Rules

    • You can define several Take Profit rules with different TargetProfitPer and SellPer values.
    • Example:

      - TargetProfitPer: 4  
        SellPer: 30      # Sell 30% at 4% profit
      - TargetProfitPer: 6  
        SellPer: 50      # Sell 50% at 6% profit
      - TargetProfitPer: 8  
        SellPer: 20      # Sell remaining 20% at 8% profit
      
    • This allows staggered profit-taking, ensuring you lock gains while leaving room for more upside.
  4. Smart TP Integration

    • If Smart TP is enabled:

      • The bot dynamically trails the market price after reaching the target profit.
      • Partial TP will only trigger if the price retracts by TrailingGapPer or if MinProfitLock conditions are met.

๐Ÿ”„ Example Scenario

Suppose:

  • Trade quantity = 1 BTC
  • DCA orders added: total 1.5 BTC
  • Partial TP configuration: SellPer: 40

Behavior:

  • Bot detects that the profit target is reached
  • Calculates 40% of the total position (1.5 BTC ร— 0.4 = 0.6 BTC)
  • Sells 0.6 BTC to lock profits
  • Remaining 0.9 BTC stays open to capture further upside

If price continues to rise, the bot can trigger another partial or full TP rule later.


๐Ÿ“Œ Why Partial Take Profit Matters

  • Locks profits gradually instead of risking all gains on a single exit
  • Manages risk in volatile markets
  • Works with DCA strategies to proportionally secure profits across multiple entry levels
  • Flexible and strategic: Combine multiple partial TP rules with Smart TP for advanced profit management

๐ŸŽฏ Key Takeaways

  • Partial TP allows selling a fraction of the position at predefined profit levels
  • Works with DCA or single-entry trades
  • Can be combined with Smart TP for dynamic trailing exits
  • Supports staggered exits to maximize profits while reducing risk

๐Ÿ“Ž Related Topics