How do I safely adjust this setting without restarting the bot?

While MagicTradeBot allows some dynamic configuration, it is highly recommended to restart the bot after adjusting DCA settings to ensure consistency and prevent unexpected behavior. However, there are safe ways to make minor adjustments without a full restart, depending on the parameter being changed.


🔹 1️⃣ Recommended Approach

  1. Preferred Method: Restart for Consistency

    • Restarting ensures that all DCA settings, including max_orders, size_multiplier, price_deviation_percent, and automatic position sizing, are fully reloaded
    • Prevents inconsistencies where some internal calculations may still use old values

🔹 2️⃣ Adjusting Settings Dynamically (Partial Updates)

  1. Minor Adjustments

    • Parameters that do not affect critical pre-calculated values (e.g., logging verbosity, enable/disable flags) can sometimes be changed on the fly via configuration file or UI
    • Examples:

      • enabled: true/false in dca.yaml or market_watch.yaml
      • DCASettings.enabled for market volatility auto-trades
  2. Cautions

    • Changes to max_orders, size_multiplier, or total_percent_investment_per_trade may not take effect immediately without restarting
    • DCA calculations for ongoing trades may continue using old values, leading to potential mis-sizing or skipped orders

🔹 3️⃣ Safe Dynamic Update Steps

  1. Step 1 – Backup Current Config

    • Always save a copy of dca.yaml or market_watch.yaml before editing
  2. Step 2 – Make Minor Changes

    • Adjust flags like enabled or toggle smart DCA on/off
  3. Step 3 – Verify Logs

    • Check Intelligent Decision Logs to confirm the bot has picked up the change
  4. Step 4 – Optional Gradual Restart

    • For critical changes (like max_orders or multipliers), schedule a short downtime and restart to apply new settings fully

🔹 4️⃣ Key Takeaways

Approach Pros Cons
Dynamic adjustment without restart Quick, minor tweaks, no downtime May not apply to all parameters, risk of inconsistencies
Restart after changes Ensures all DCA settings are consistently applied Requires brief downtime
  • Best practice: Use dynamic adjustments only for non-critical flags, and restart the bot for all major DCA parameter changes
  • This ensures accurate DCA calculation, consistent position sizing, and safe trade execution

In short, while minor DCA settings can be toggled on-the-fly, restarting the bot is the safest way to ensure all changes are applied correctly, preventing mis-sizing, skipped orders, or unintended risk exposure.

📎 Related Topics