In MagicTradeBot, the max_orders setting defines the maximum number of DCA (Dollar Cost Averaging) orders the bot can place for a single trade, including the initial order.
When the market moves against your position and the bot has already placed the maximum number of DCA orders, no further DCA orders will be triggered.
This behavior is crucial for controlling risk and avoiding overexposure.
๐น Detailed Explanation
Initial Trade and DCA Orders
When a trade is opened, the first order is the initial entry.
- If the price moves against the position, the bot can place additional DCA orders.
The total number of orders is capped by
max_orders.Reaching the Limit
Example:
max_orders: 3
- Initial order = 1
- DCA order 1 = 2
- DCA order 2 = 3 โ max_orders reached
Once this limit is reached:
- No more DCA orders will be placed, even if the price continues moving against your position.
- The position will remain open, and risk is now entirely in the existing orders.
- Recovery depends on the price moving back in your favor.
๐น What This Means for Traders
1๏ธโฃ Risk Control
max_ordersprevents unlimited averaging, which could drain your account if the market moves continuously against your position.- The last DCA order acts as the final safety net โ after that, exposure is fixed.
2๏ธโฃ Recovery Limitation
- Once maximum DCA orders are reached, the bot cannot further reduce average entry price.
- If the price keeps moving against you, losses accumulate on the existing position.
- Risk management (like MaxLossPerTrade or Smart Stop-Loss) becomes critical at this stage.
3๏ธโฃ Strategic Implication
Traders must plan
max_ordersaccording to:- Account size
- Market volatility
- Asset type
- Multiplier settings
Too few DCA orders โ limited recovery potential
Too many DCA orders โ increased risk if trend continues
๐น Example Scenario
Trade Settings:
- Max Orders: 3
- Multiplier: 1.2
- Trade Budget: $1,000
| Order | Amount | Status |
|---|---|---|
| Initial | $370 | Filled |
| DCA 1 | $444 | Filled |
| DCA 2 | $532 | Filled โ max_orders reached |
Market moves further against position:
- No more DCA orders are placed
- Total exposure = sum of all 3 orders
- Bot will rely on stop-loss or SmartTP to manage risk and profit
โ๏ธ Key Notes
- Applies to manual, signal-based, and auto trades
- Works for long and short positions
- Does not trigger additional orders once the limit is reached
- Risk management settings are essential to prevent account drain after reaching
max_orders
๐ Final Summary
When the maximum number of DCA orders is reached:
- No further DCA orders are placed
- The positionโs exposure is fixed based on the filled orders
- Recovery depends solely on price moving back in your favor
- Proper risk controls like MaxLossPerTrade, stop-loss, and SmartTP must be in place
The
max_orderslimit ensures that your DCA strategy has a controlled risk envelope, preventing uncontrolled averaging and potential account wipeouts.