Understanding the Two Layers of Trading Permission
The MetaTrader 5 platform applies automated trading controls at two distinct levels. The first is the global terminal setting, which acts as a master switch for all Expert Advisors and scripts. The second is the individual Expert Advisor property, which can independently allow or restrict trading even when the global switch is enabled. According to the platform documentation, disabling the global AutoTrading option prevents every attached robot from executing trades, regardless of its individual settings. Conversely, enabling the global switch does not guarantee trading will occur; each EA must also have its own Allow Auto Trading parameter set to true. This layered design prevents accidental trading while allowing selective testing of analytical routines.
The individual Expert Advisor properties window contains a specific Allow Auto Trading checkbox. When this box is unchecked, the robot can still receive ticks and run its code, but any attempt to open or modify positions will be silently ignored. The documentation notes that this setting is useful for testing analytical capabilities in real-time mode without risking capital. The Navigator window provides a quick visual check: a small icon next to each running EA indicates whether trading is currently permitted. A green icon means the EA is allowed to trade, while a red icon signifies that trading is disabled for that specific instance.
Sources: MetaTrader 5 documentation: robots
Platform-Wide Settings That Block Automated Trading
Several global options in the terminal settings can interrupt automated trading even when individual EAs are configured correctly. The Expert Advisors tab of the Options dialog contains the master Allow Auto Trading toggle. If this is turned off, no Expert Advisor or script can execute trade operations across the entire platform. Additionally, the platform includes protective mechanisms that automatically disable trading during account changes, profile switches, or symbol and timeframe transitions. These safeguards are designed to prevent unintended trading when a user switches from a demo to a live account or loads a different chart configuration.
The documentation also highlights a setting that disables automated trading via the external Python API. Python scripts integrated with the platform can perform trading operations, but this capability is locked by default for security reasons. Users must explicitly enable this option to allow Python scripts to trade. Another critical setting is Allow DLL imports, which controls whether Expert Advisors can use external dynamic-link libraries. Since DLLs can extend functionality but also introduce security risks, the platform recommends disabling this option when working with unknown or third-party Expert Advisors.
Sources: MetaTrader 5 documentation: robots
Preparing for a Demo Run
Before initiating a demo test, the first step is to confirm that the global AutoTrading switch in the toolbar is enabled. This button toggles automated trading for all EAs on the current account. Next, the user should verify that the specific Expert Advisor being tested has its Allow Auto Trading parameter set to true in the properties window. The Navigator window offers a convenient way to check the status of all running EAs at once, displaying both the chart association and the trading permission icon for each instance.
It is also important to review the account type. The documentation mentions a protective option that disables automated trading when switching accounts, which is particularly relevant when moving between demo and live accounts. For a pure demo run, ensure that this safeguard does not inadvertently block the test. Additionally, check that no profile or chart symbol changes are scheduled during the test period, as these can automatically revoke trading permissions if the corresponding protective settings are enabled.
Sources: MetaTrader 5 documentation: robots MetaTrader 5 documentation: automation
Monitoring Expert Advisor Execution
During a demo run, the platform provides multiple ways to monitor whether the Expert Advisor is operating as expected. The Journal tab in the Terminal window displays real-time logs of all EA actions, including initialization, tick processing, and any trade attempts. If an EA is blocked from trading, the journal will show error messages indicating that trade operations were rejected due to permission settings. The Experts list in the Navigator window also updates in real time, showing the current status of each running EA and whether it is permitted to trade.
For deeper analysis, the Strategy Tester can be used to replay historical data while logging every internal decision. This is separate from live demo testing but helps verify that the EA logic functions correctly before real-time execution. During a live demo, the chart icon for the EA provides a quick visual cue: a green icon in the top-right corner confirms that the robot is active and allowed to trade. If the icon is red, the EA is running but restricted, which is useful for isolating analytical bugs from trading permission issues.
Sources: MetaTrader 5 documentation: robots MetaTrader 5 documentation: automation
Documented Steps to Resolve Permission Issues
If an Expert Advisor fails to trade during a demo run, follow this documented sequence. First, verify that the global AutoTrading button in the toolbar is enabled. Second, open the Navigator window and check that the EA's icon indicates trading is allowed; if not, right-click and select Enable Auto Trading. Third, open the EA properties and confirm that the Allow Auto Trading checkbox is selected. Fourth, review the platform Options under the Expert Advisors tab to ensure no global restrictions are active, such as account switching or profile change protections.
Finally, check for any DLL or Python API restrictions that might be blocking the EA. If the EA uses external DLLs, ensure that Allow DLL imports is enabled in both the platform settings and the EA properties. For Python scripts, verify that the Disable automated trading via external Python API option is unchecked. After making these adjustments, restart the Expert Advisor by removing and re-attaching it to the chart. The documentation explicitly states that changing permissions requires re-initialization of the EA for the new settings to take effect.
Sources: MetaTrader 5 documentation: robots MetaTrader 5 documentation: automation
AI-assisted educational article. Automated checks reviewed source support and quality; they do not guarantee accuracy. This is not investment advice. Leveraged and automated trading involves substantial risk of loss.
Sources & further reading
MetaTrader 5 documentation: automationMetaTrader 5 documentation: robotsEducational content only. This article is not investment advice. Automated and leveraged trading involves substantial risk of loss.