What does price_deviation_percent control in DCA?

In MagicTradeBot, the price_deviation_percent is a critical DCA (Dollar Cost Averaging) setting that determines how far the price must move against your trade before the next DCA order is triggered.

Essentially, it defines the spacing between DCA orders, controlling when the bot averages down (for longs) or averages up (for shorts).


🔹 How price_deviation_percent Works

  1. Initial Trade

  2. The first order is placed at your entry price.

  3. Subsequent DCA Orders

  4. Each DCA order is triggered only if the price moves against your position by at least the specified price_deviation_percent.

Example:

Settings:

max_orders: 3
price_deviation_percent: 5

Trade: Long BTC at $20,000

Order Trigger Price Action
Initial $20,000 Buy $100
DCA 1 $19,000 (-5%) Buy next DCA order
DCA 2 $18,050 (-5% from previous) Buy next DCA order
  • Each DCA order is only placed when price moves 5% further against the position.

🔹 How It Affects DCA Behavior

1️⃣ Order Frequency

  • Smaller price_deviation_percent → DCA orders trigger more frequently
  • Larger price_deviation_percent → DCA orders are spaced further apart

Example for a long trade:

Price Deviation Number of DCA Orders Triggered (market drops 10%)
2% 5 orders (frequent averaging)
5% 2 orders (moderate averaging)
10% 1 order (sparse averaging)

2️⃣ Risk Exposure

  • Smaller deviations → more capital deployed faster → higher risk if trend continues against you
  • Larger deviations → slower recovery, potentially missing favorable price points, but lower risk

3️⃣ Recovery Potential

  • Smaller deviations reduce the average entry price faster because DCA orders are placed sooner
  • Larger deviations require bigger price swings to trigger DCA, slowing average price reduction

🔹 Strategic Considerations

  1. Asset Volatility

  2. Highly volatile assets (e.g., meme coins) → larger deviation recommended to avoid excessive DCA orders

  3. Low-volatility assets (e.g., BTC, ETH) → smaller deviation is safe and improves recovery

  4. Trade Duration

  5. Short-term trades → smaller deviation can help quickly recover adverse moves

  6. Long-term trades → larger deviation is sufficient to catch major pullbacks

  7. Budget & Risk Management

  8. Always ensure total DCA exposure fits within your trade budget

  9. Combine with max_orders, size_multiplier, and MaxLossPerTrade

🔹 Recommended Beginner Settings

Asset Type Suggested price_deviation_percent
BTC, ETH 3–5%
Stable Altcoins 2–4%
Meme Coins / High-Risk 5–10%

Smaller deviation triggers more frequent averaging, but increases exposure. Larger deviation reduces risk but may slow recovery.


🔹 Key Notes

  • Applies to manual, signal-based, and auto trades
  • Works for long and short positions
  • Determines when DCA orders are triggered based on price movement
  • Must be balanced with size_multiplier and max_orders for safe risk management

🏁 Final Summary

price_deviation_percent in MagicTradeBot controls:

  1. Spacing between DCA orders
  2. When the next averaging order is triggered
  3. Order frequency, capital deployment, and recovery speed

Properly setting price_deviation_percent ensures that DCA orders are placed at meaningful price levels, balancing recovery potential with risk exposure.

📎 Related Topics