In MagicTradeBot, DCA spacing is determined primarily by the price_deviation_percent setting, which defines the gap between each DCA order. Proper spacing is critical for margin safety, especially when trading on leverage or in volatile markets.
DCA spacing ensures that the bot does not overexpose your account, preventing margin calls or liquidation while allowing effective averaging.
๐น How DCA Spacing Affects Margin Safety
1๏ธโฃ Avoids Overcrowding Orders
- Tight spacing (small
price_deviation_percent) โ many DCA orders can trigger in a small price range. - If the market moves sharply against your position, all these orders deploy capital quickly, potentially exceeding your available margin.
- Proper spacing ensures orders are placed at meaningful price levels, giving your account breathing room.
2๏ธโฃ Controls Exposure on Leveraged Positions
- When trading with leverage, each DCA order increases both position size and margin requirement.
- Wide spacing between orders prevents the margin from being tied up too early, reducing the risk of liquidation.
Example:
- Long BTC at $20,000 on 10x leverage
- Max Orders = 3
- Price Deviation = 2% โ DCA orders triggered at $19,600, $19,208 โ quickly consumes margin
- Price Deviation = 5% โ DCA orders triggered at $19,000, $18,050 โ spreads exposure over larger movement, safer margin usage
3๏ธโฃ Allows Time for Market Reversals
- If spacing is too tight, minor fluctuations trigger DCA orders unnecessarily.
- Wider, well-planned spacing ensures DCA only activates during significant adverse moves, giving the market a chance to reverse and reducing cumulative margin usage.
4๏ธโฃ Reduces Risk of Forced Liquidation
- Improper spacing with high leverage โ DCA orders can overload your account, leaving no buffer for further market moves.
- Proper spacing +
max_ordersensures your position remains within safe margin limits, even if the market continues against you temporarily.
๐น Practical Guidelines for Safe DCA Spacing
| Asset Type | Suggested price_deviation_percent |
Notes |
|---|---|---|
| BTC, ETH | 2โ5% | Stable assets; moderate spacing balances recovery & margin safety |
| Stable Altcoins | 3โ5% | Provides safe averaging without tying margin too quickly |
| Meme Coins / High-Risk | 5โ10% | High volatility; wide spacing prevents margin overload |
Other Considerations:
- Combine with
max_ordersto cap total exposure - Adjust
size_multiplierto control order scaling - Always factor in account balance, leverage, and total trade budget
๐น Key Takeaways
- Prevents overexposure by spacing DCA orders meaningfully
- Manages margin usage for leveraged positions
- Reduces risk of liquidation during adverse market movements
- Ensures recovery potential without compromising account safety
- Works with long and short trades, manual, signals, and auto trades
๐ Final Summary
Proper DCA spacing is essential for margin safety because it:
- Controls when and how many DCA orders are placed
- Limits capital and margin deployment
- Reduces risk of forced liquidation
- Gives room for price reversals before committing more capital
Well-planned DCA spacing allows the bot to average positions safely while maintaining enough margin buffer, protecting your account from unnecessary risk in volatile or leveraged markets.