How is total DCA exposure calculated using this percentage?

In MagicTradeBot, total DCA exposure represents the combined value of the initial order and all subsequent DCA orders for a single trade. The total_percent_investment_per_trade setting is used to cap this combined exposure relative to your account balance, ensuring safe and controlled DCA execution.


๐Ÿ”น 1๏ธโƒฃ How It Works

  1. Determine Maximum Allocation

    • The bot calculates the total allowable capital for a DCA trade using:

    [ \text{Max DCA Exposure} = \text{Account Balance} \times \frac{\text{total_percent_investment_per_trade}}{100} ]

    • Example: For a $1,000 account and total_percent_investment_per_trade = 5%: [ \text{Max DCA Exposure} = 1,000 \times 0.05 = 50 \text{ USDT} ]
  2. Sum All DCA Orders

    • The initial order and all subsequent DCA layers are calculated based on size_multiplier and the number of max_orders
    • These amounts are added together to ensure the total exposure does not exceed the calculated maximum
  3. Dynamic Adjustment

    • If the sum of initial + DCA orders would exceed the maximum:

      • Each order is scaled proportionally to fit within the exposure limit
    • Ensures safe cumulative investment, even in aggressive DCA setups

๐Ÿ”น 2๏ธโƒฃ Practical Example

Account Balance: $1,000 DCA Settings:

auto_calculate_initial_amount: true
total_percent_investment_per_trade: 5
max_orders: 3
size_multiplier: 1.2

Step 1 โ€“ Calculate Max Exposure

  • 5% of $1,000 = $50 total DCA allocation

Step 2 โ€“ Calculate Orders

  • Initial order = $50 รท (1 + 1.2 + 1.2ยฒ) โ‰ˆ $15.15
  • DCA 1 = $15.15 ร— 1.2 โ‰ˆ $18.18
  • DCA 2 = $18.18 ร— 1.2 โ‰ˆ $21.67

Step 3 โ€“ Total Exposure

  • $15.15 + $18.18 + $21.67 โ‰ˆ $55 โ†’ exceeds max, so orders are scaled down
  • Adjusted orders:

    • Initial โ‰ˆ $13.64
    • DCA 1 โ‰ˆ $16.36
    • DCA 2 โ‰ˆ $20.00
  • Total exposure = $50 โ†’ matches total_percent_investment_per_trade

The bot sums all DCA layers and ensures total investment stays within the allowed percentage, protecting your account from overexposure.


๐Ÿ”น 3๏ธโƒฃ Key Benefits

Benefit Description
Controlled Risk Limits total capital at risk per trade
Predictable Exposure All DCA layers combined stay within safe bounds
Safe Scaling Orders are dynamically adjusted if needed
Adaptable Works for both small and large accounts

๐Ÿ”น 4๏ธโƒฃ Key Takeaways

  • Total DCA exposure = initial order + all DCA layers
  • total_percent_investment_per_trade defines maximum allowed exposure relative to account balance
  • Ensures consistent, risk-managed DCA execution
  • Prevents overexposure, even in aggressive or volatile market conditions

In short, this setting acts as the cap on cumulative DCA investment, keeping your account safe while allowing multiple DCA orders to scale properly.

๐Ÿ“Ž Related Topics