MaxLossBeforeForceClose is a risk-limiting feature in MagicTradeBot designed to protect your account from excessive loss on individual trades. It works at the single-trade level to prevent a single position from wiping out a large portion of your balance.
🧠 How It Works
Per-Trade Loss Threshold
- You can set a maximum allowable loss for each individual trade.
- Example:
MaxLossBeforeForceClose: 50 # Close trade if loss exceeds 50 USDT
Immediate Trade Closure
- When the trade’s loss exceeds the configured threshold, the bot sells that trade immediately, regardless of other active strategies like DCA or Smart TP.
Account Protection
- By closing the losing trade, it limits the damage to your balance.
- If no other trades are open, the remaining account balance is fully preserved, preventing total liquidation.
Scope
- Single trade only – does not affect other running trades.
- Works alongside other risk management rules such as Global Maximum Loss Protection for broader account safety.
🔑 Key Points
- Purpose: Protect account from large losses on a single trade
- Execution: Automatic closure when loss threshold is exceeded
- Scope: Single trade only; remaining balance remains safe
- Best Practice: Set this threshold according to your risk tolerance per trade
In short, MaxLossBeforeForceClose acts as a safety valve for individual trades, ensuring that a single losing position cannot disproportionately impact your account while leaving the remaining balance protected.