How do MaxProfitReached and MaxLossReached work?

MaxProfitReached and MaxLossReached are critical safety rules in MagicTradeBot that help manage risk and secure profits, especially when running complex or aggressive strategies like DCA or money management (e.g., Martingale, Fibonacci).


๐Ÿง  How They Work

  1. MaxLossReached

    • Sets a hard stop for losses on a trade or account
    • Example:
MaxLossReached: 150  # Close trade immediately if loss reaches 150 USDT
  • Even if other thresholds (like dynamic stop-loss or multiple DCA orders) are in play, the trade will be closed immediately once this loss limit is reached
  • Protects your account from excessive losses during aggressive strategies

  • MaxProfitReached

    • Sets a hard target for gains, ensuring trades lock in profits
    • Example:
MaxProfitReached: 300  # Close trade immediately if profit reaches 300 USDT
  • Overrides other trailing profit or partial take-profit rules if this profit level is reached
  • Ensures that high-performing trades are secured automatically

  • Ideal Use Case

    • Useful when using aggressive DCA, Martingale, Fibonacci, or other money management strategies
    • Gives the trader confidence to take bigger risks knowing that losses are capped and profits can be locked automatically

๐Ÿ”‘ Key Points

  • Purpose: Provide absolute safety limits for both profit and loss
  • Execution: Immediate closure when thresholds are reached
  • Best Practice:

    • Set MaxLossReached to a level your account can absorb
    • Set MaxProfitReached to lock in target gains without overexposing the position

In short, MaxProfitReached and MaxLossReached act as hard-stop guardrails, allowing you to execute aggressive strategies while automatically controlling risk and securing profits.

๐Ÿ“Ž Related Topics