Partial Take Profit (Partial TP) and Smart TP work together in MagicTradeBot to maximize profits while managing risk, allowing the bot to scale out of positions gradually based on both pre-defined targets and dynamic trailing logic.
๐ง Interaction Overview
Partial TP (
SellPer < 100)- Specifies a percentage of the trade to close at a given target profit
- Example:
SellPer: 40โ closes 40% of the total position when the TP condition is met
Smart TP
- Dynamically trails the price after the trade moves in your favor
- Uses
TrailingGapPer,MinProfitLock, andUseDynamicGapto lock profits and react to reversals
Combined Behavior
- Each Partial TP rule can have Smart TP enabled independently
- Bot monitors the peak price for each rule and triggers the partial exit if conditions are met
- Remaining position continues to ride the trend until the next TP rule or final exit
Example Configuration:
TakeProfitRules:
- TargetProfitPer: 5
SellPer: 40
RuleName: "Partial TP 1"
IsEnabled: true
EnableSmartTP: true
TrailingGapPer: 2
MinProfitLock: 3
UseDynamicGap: true
- TargetProfitPer: 10
SellPer: 60
RuleName: "Partial TP 2"
IsEnabled: true
EnableSmartTP: true
TrailingGapPer: 3
MinProfitLock: 5
UseDynamicGap: true
- Step 1: Trade reaches 5% profit โ 40% of position is sold using Smart TP trailing logic
- Step 2: Trade continues to move in favor โ remaining 60% monitored by next TP rule
- Step 3: Trade reaches 10% profit โ final 60% is sold, again respecting trailing gap and min profit lock
๐ Key Advantages
- Gradual Profit Scaling: Partial TP lets you lock in profits incrementally rather than all at once
- Dynamic Adaptation: Smart TP ensures each partial exit captures the maximum possible profit if the trend continues
- Risk Management: By selling in parts, you reduce the risk of losing all unrealized profits in a market reversal
๐ Important Notes
- Each Partial TP rule can independently enable Smart TP
- Works seamlessly with DCA positions, ensuring each averaged entry benefits from trailing logic
- Recommended for volatile markets to maximize gains while protecting partial profits