Summary: EA attached to MT5 chart but doing nothing? This guide walks through the complete debugging process: checking the EA icon, global Algo Trading button, reading the Journal tab, and fixing common runtime errors like Invalid Stops and Not Enough Money.
Step 1: Check the EA Icon on Your Chart
Look at the top-right corner of the chart where your EA is attached. If the icon is gray (inactive) instead of blue (active), double-click the EA on the chart, go to the ‘Common‘ tab, and enable both ‘Allow Algo Trading‘ and ‘Allow Live Trading‘. Click OK. Screenshot: Common tab with both options checked [citation:3].
Step 2: Verify the Global Algo Trading Button
Look at the MT5 top toolbar. Find the ‘Algo Trading‘ button (robot icon). If it is crossed out or red, click it to enable. This button must be enabled for any EA to trade, regardless of individual EA settings. Screenshot: Top toolbar with Algo Trading button highlighted [citation:3].
Step 3: Open the Journal Tab to Find Errors
Press Ctrl+T to open the Toolbox window, then click the ‘Journal‘ tab. This is where MT5 logs all trade attempts, warnings, and errors. Look for red error messages. These messages tell you exactly why your EA is not trading. Screenshot: Journal tab showing red error messages [citation:3].
Step 4: Fix ‘Invalid Stops‘ Error
If you see ‘Invalid stops‘ or ‘Error 130‘, your EA tried to set a stop loss or take profit too close to the current market price. Every broker has a minimum distance requirement. Widen your SL/TP distance in the EA parameters. Check your broker’s minimum stop distance by opening a manual order window. Screenshot: Order window showing minimum stop distance [citation:3].
Step 5: Fix ‘Not Enough Money‘ Error
If you see ‘Not enough money‘ or ‘Margin insufficient‘, your account balance or free margin is too low for the trade size. Reduce the lot size in your EA settings, reduce risk per trade, close other open positions, or increase your demo balance. Screenshot: EA input parameters with lot size field circled [citation:3].
Step 6: Fix ‘Market Closed‘ Error
If you see ‘Market closed‘, your EA tried to trade outside active market hours. This often happens on weekends, during holidays, or outside your broker‘s trading session. Add a session filter to your EA strategy or only run the EA during active market hours. Screenshot: Market closed error message in Journal tab [citation:3].
Step 7: Fix ‘Trade Context Busy‘ Error
If you see ‘Trade context busy‘, your EA sent multiple trade requests too quickly or simultaneously. This happens when ‘Run per Tick‘ triggers too often. Add a small delay between trade attempts or use a ‘Count Trades‘ filter to prevent duplicate orders. Screenshot: Trade context busy error example [citation:3].
Step 8: Test with Visual Mode for Deeper Debugging
If the error is not obvious, run your backtest in Visual Mode (Strategy Tester → Visual Mode). The Journal appears next to the chart, and you can see price action, trades, and EA logic step by step. This is the best way to understand what your EA is doing. Screenshot: Visual Mode with Journal panel visible [citation:3].
Reference: MetaQuotes Help Desk – Expert Advisors Debugging Guide (2026), Profectus.AI Error Code Documentation.