I've seen many Expert Advisors (EAs) argue with real accounts, losing thousands of dollars in the process. Why? Because we trusted them too much. Today, I'll share the 7 golden rules we must thoroughly check before letting an EA trade on a real account. Let's get started.

Check for order sending commands in the code

Searching for order sending commands in EA code
Checking the code to find hidden order sending commands

We need to search for order sending commands in every line of code. In some cases, EAs may hide OrderSend or MqlTradeRequest commands in unused functions or complex if conditions. I've seen EAs that had order sending commands hidden in a small function that was never called, but when a certain bug occurred, that function got triggered, causing the EA to send orders unexpectedly. This is why a thorough line-by-line examination is crucial, as even a single overlooked command can lead to significant financial losses when the EA is deployed in live trading.

Check live trading switches in all configuration files

Checking live trading switches in EA configuration files
Making sure live trading switches are turned off in all configuration files

Live trading switches should be turned off in all EA configuration files. I've encountered cases where EAs had multiple configuration files, and some didn't even have an option to turn live trading on or off, causing the EA to start trading immediately when loaded. Additionally, we must check that there are no commands directly enabling live trading in the code. This comprehensive approach ensures that no matter which configuration file is used or how the EA is initialized, it won't execute trades without explicit permission.

Don't touch external connection whitelists

We must verify that the EA doesn't define whitelists for external connections. Some EAs might send data to external servers or pull data from external sources that shouldn't be accessible. In our company, we use a private NAS as an internal server to store operation logs for all EAs. This practice helps us maintain complete control over where our EAs send information and prevents any unauthorized data transmission that could compromise our trading strategies.

Test with read-only mode before going live

Before letting an EA work on a real account, test it in read-only mode first. That means letting the EA analyze only, without sending any orders. We use MetaTrader 5 on a Mac Mini M4 Pro for this type of testing, setting the EA to analyze 24/7 and checking the results daily. This extended testing period allows us to observe how the EA performs under various market conditions without risking any capital, giving us confidence in its decision-making process.

Check the entire file set

We must check the entire file set, not just the main file. Some EAs have supplementary files or libraries that they depend on, and some of these files also contain order sending functions. I've seen cases where the main EA file had no order sending commands, but one supplementary file did. This is why a comprehensive review of all associated files is essential, as hidden trading functions in auxiliary components can easily be overlooked during a cursory examination.

Use pause mode for testing

When testing an EA on a real account for the first time, use pause mode first. That means letting the EA analyze and display signals only, without sending real orders. We use this feature on MT5 by temporarily disconnecting from the broker's server, allowing the EA to work in offline mode. This method provides a realistic testing environment while maintaining complete control over whether trades are actually executed, serving as an intermediate step between simulation and full live trading.

Check the operation log

We must check the EA's operation log in detail. The log should show every signal that the EA decides to trade on, even if no order is sent. The log helps us better understand the EA's behavior. In our company, we have a comprehensive logging system that stores every movement of every EA. This meticulous record-keeping allows us to backtrack and analyze the EA's decision-making process, identifying any patterns or anomalies that might not be apparent during real-time monitoring.

Lessons from EA testing

Thoroughly checking an EA before use is extremely important. I've lost thousands of dollars due to overconfidence. Today, we have a strict EA verification process that significantly reduces risks. For those who want to try real gold trading, open an XM account at: open an XM account via our partner