Resolving the “Auto Trading Disabled by Client” Error in MT5


Suppose you encounter the error message “Auto trading disabled by client” in MetaTrader 5 (MT5) while trying to run an Expert Advisor (EA) such as Blue Hat. In that case, it indicates that automated trading has been restricted or turned off. This guide explains the possible causes of this issue and provides step-by-step solutions to resolve it.
mt5 blue hat

Understanding the Error

The error occurs when MT5 cannot execute automated trading functions due to one or more restrictions. These restrictions may be set in the platform, your broker, or the EA settings. Let’s explore the common reasons:

  1. Global Auto-Trading is Disabled: The platform’s auto-trading feature is turned off.
  2. EA-Specific Restrictions: The EA might have limitations preventing it from running.
  3. Broker-Imposed Limitations: Some brokers turn off auto-trading by default for safety.
  4. Account Type Restrictions: Auto-trading might not be allowed on demos or specific account types.
  5. Error in EA Code: The EA may include a condition that turns off trading.

Step-by-Step Solutions

1. Enable Global Auto-Trading in MT5

MT5 has a master switch to control auto-trading for all EAs. Ensure this feature is enabled:

  1. Locate the Auto-Trading Button
    • Look for the Auto-Trading button on the MT5 toolbar. It appears as a play icon with a green arrow.
    • If it’s red, auto-trading is disabled.
  2. Turn On Auto-Trading
    • Click the Auto-Trading button to turn it green. This globally enables automated trading.

2. Check EA Permissions

Each EA requires specific permissions to function. Ensure that Blue Hat has been granted the necessary permissions:

  1. Open EA Settings
    • Right-click on the chart where Blue Hat is running.
    • Select Expert Advisors > Properties (or press Ctrl+I).
  2. Enable Auto-Trading for the EA
    • In the Common tab, check the box for Allow Algo Trading.
    • Ensure other necessary options, such as Allow DLL Imports, are enabled if applicable.
  3. Save and Restart
    • Click OK to save changes and restart the EA.

3. Verify MT5 Platform Settings

Sometimes, platform-level settings override auto-trading permissions.

  1. Open Options Menu
    • Go to Tools > Options (or press Ctrl+O).
  2. Check the Expert Advisors Tab
    • Navigate to the Expert Advisors tab.
    • Ensure the following settings are correct:
      • Allow Algo Trading to be checked.
      • Disable Auto-Trading When Changing Accounts is unchecked.
      • Disable Auto-Trading When Changing Charts is unchecked.
      • Disable Auto-Trading When Profile Changes are unchecked.
  3. Save and Restart
    • Click OK to save the changes and restart MT5.

4. Verify Broker Settings

Your broker might restrict auto-trading. Contact your broker’s support team to confirm:

  1. Check Account Type
    • Ensure your account type supports automated trading.
  2. Review Permissions
    • Verify that your broker allows EAs and auto-trading features.
  3. Update Account Settings
    • If restrictions are in place, request the broker to enable auto-trading for your account.

5. Debug EA-Specific Issues

If the above steps do not resolve the error, the issue might lie in the EA itself:

  1. Check EA Logs
    • Open the Experts or Journal tab in the MT5 terminal window.
    • Look for detailed error messages related to Blue Hat.
  2. Review EA Code
    • If you can access the source code, check for conditions that turn off trading. Look for code like:
      mql5
      if (!IsAutoTradingAllowed())
      {
      Print("Auto trading is disabled by client.");
      return;
      }
    • Modify the code to ensure the EA runs under the current configuration.
  3. Update or Replace the EA
    • Download the latest version of Blue Hat from a trusted source.
    • Reinstall the EA and test again.

6. Test on a Different Account

If none of the above steps work, try running the EA on a different account:

  1. Create a New Demo Account
    • Set up a new demo account to rule out account-specific issues.
  2. Test with Another Broker
    • If the problem persists, consider testing the EA on another broker’s platform.

Common Pitfalls

  • Multiple Restrictions: Ensure all necessary permissions (platform, EA, and broker) are enabled simultaneously.
  • Outdated EA or Platform: An outdated MT5 or the EA version might cause compatibility issues. Always keep both updated.
  • Firewall or Antivirus Blocks: Sometimes, security software interferes with MT5. Temporarily turn off such programs to test.

Conclusion

The error “Auto trading disabled by client” in MT5 is typically caused by configuration issues, broker restrictions, or limitations within the EA. Following the steps outlined above, you can systematically identify and resolve the issue, ensuring that Blue Hat or any other EA functions correctly.

If the issue persists after trying these solutions, consider consulting a professional MQL5 developer or contacting your broker’s support team for further assistance.

Fxigor

Fxigor

Igor has been a trader since 2007. Currently, Igor works for several prop trading companies. He is an expert in financial niche, long-term trading, and weekly technical levels. The primary field of Igor's research is the application of machine learning in algorithmic trading. Education: Computer Engineering and Ph.D. in machine learning. Igor regularly publishes trading-related videos on the Fxigor Youtube channel. To contact Igor write on: igor@forex.in.rs

Trade gold and silver. Visit the broker's page and start trading high liquidity spot metals - the most traded instruments in the world.

Trade Gold & Silver

GET FREE MEAN REVERSION STRATEGY

Recent Posts