Table of Contents
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:
- Global Auto-Trading is Disabled: The platform’s auto-trading feature is turned off.
- EA-Specific Restrictions: The EA might have limitations preventing it from running.
- Broker-Imposed Limitations: Some brokers turn off auto-trading by default for safety.
- Account Type Restrictions: Auto-trading might not be allowed on demos or specific account types.
- 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:
- 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.
- 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:
- Open EA Settings
- Right-click on the chart where Blue Hat is running.
- Select Expert Advisors > Properties (or press
Ctrl+I
).
- 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.
- 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.
- Open Options Menu
- Go to Tools > Options (or press
Ctrl+O
).
- Go to Tools > Options (or press
- 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.
- 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:
- Check Account Type
- Ensure your account type supports automated trading.
- Review Permissions
- Verify that your broker allows EAs and auto-trading features.
- 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:
- Check EA Logs
- Open the Experts or Journal tab in the MT5 terminal window.
- Look for detailed error messages related to Blue Hat.
- 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.
- If you can access the source code, check for conditions that turn off trading. Look for code like:
- 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:
- Create a New Demo Account
- Set up a new demo account to rule out account-specific issues.
- 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.
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
Related posts:
- Fibonacci Expansion Levels – Download Auto Fibonacci Extension Indicator MT4
- Download Auto Trend Channel Indicator MT4
- Download Auto Support Resistance Indicator
- How to Convert MT4 Indicators to MT5? – Auto MQL4 to MQL5!
- Download Auto Break-Even Expert Advisor – Move Stop Loss to Break-Even MT4 & MT5 EA
- What Does Mean MT4 “Not enough money” Error?
- What is MetaTrader 4 Market Closed Error?
- How to Fix MT4 Old Version Error? – Live Update Failure!
- How to Fix MT4 Common Error in 2024? – Screenshots and Video Instruction
- How to Fix Metatrader 4 Off Quotes Error? – Off Quotes MT4 in 2024.
- What is Copy and Paste Forex Trading or Mirror trading?
- Is Forex Trading Legal in Canada? – Forex Trading in Canada in 2024!