рджреНрд╡рд╛рд░рд╛ William Harris ┬╖ рдЕрдВрддрд┐рдо рд╕рдореАрдХреНрд╖рд╛
Why Is My EA Not Trading in MT5? (Diagnostic Flowchart)
рдЖрдкрдХреЛ рдХреНрдпрд╛ рдЪрд╛рд╣рд┐рдП
- тАв MT5 with the affected EA attached
- тАв MT5 тЖТ View тЖТ Toolbox to see Experts and Journal tabs
рдЪрд░рдг-рджрд░-рдЪрд░рдг рдирд┐рд░реНрджреЗрд╢
рдЪрд░рдг 1: Check the smiley face on the chart
The chart's top-right corner shows the EA name and a small smiley face. Three states:
тАв Green smiley тАФ EA running, trading allowed. If you're here and no trades happen, skip to step 3.
тАв Red sad face тАФ EA loaded but trading disabled. Hover over the EA name to see the reason. Common reasons: - 'Trading not allowed in EA properties' тАФ open EA Properties тЖТ Common tab тЖТ tick 'Allow live trading'. - 'AutoTrading button disabled' тАФ click the AutoTrading button in the toolbar so it turns green. - 'No connection' тАФ broker connection dropped; check status bar. - 'Account is in read-only mode' тАФ you logged in with the investor password; switch to master.
тАв No icon тАФ EA not loaded. Re-drag from Navigator or check if it was removed.
The smiley is your single best first-pass diagnostic. 80% of 'EA not trading' issues resolve at this step.
рдЪрд░рдг 2: Read the Experts tab
View тЖТ Toolbox (Ctrl+T) тЖТ Experts tab shows every message printed by every EA, time-stamped, scrollable. This is your second-best diagnostic.
What to look for: тАв 'EAName,EURUSD M5: initialised' тАФ EA loaded successfully. Good sign. тАв 'EAName,EURUSD M5: OnInit error code XYZ' тАФ EA failed to initialise. Look up the error code in the MQL5 documentation or vendor docs. Common: code 4001 (No connection), 130 (Invalid stops), 4109 (Trading not allowed). тАв Messages like 'Waiting for first signal' or 'Outside trading window' тАФ EA is healthy but intentionally not trading right now. тАв Repeated 'Insufficient margin' or 'Off quotes' тАФ broker-side rejection; see step 5. тАв Absolutely silent for hours тАФ likely the EA's OnTick isn't being called (no ticks arriving) or the EA is mute by design. Check the broker connection.
Filter the log by your EA's chart in the dropdown at the top. The combined log across all EAs can be overwhelming with multiple EAs running.
рдЪрд░рдг 3: Check if the EA is signalling but doing nothing
If the smiley is green and the Experts log shows 'EA initialised' but no trades for hours, the EA is alive but not generating buy/sell signals. Likely reasons:
тАв Trading session filter тАФ many EAs restrict trading to specific hours (e.g. London-only 8am-5pm UTC). Outside the window, no signals. Check the EA's Inputs tab for parameters named 'StartHour', 'EndHour', 'TradingSession'.
тАв Day-of-week filter тАФ some EAs avoid Mondays (low volume) or Fridays (weekend gap risk). Check 'TradeMonday/Friday' inputs.
тАв Volatility filter тАФ EAs that require minimum ATR or minimum momentum sit out low-volatility periods. Common in summer (June-August) when major-pair volatility drops 30-50%.
тАв News filter тАФ many EAs avoid trading 30-60 minutes around high-impact news. If you're in a quiet news week the EA may trade fine; in a busy news week it may sit out most sessions.
тАв Account-condition filter тАФ EAs sometimes refuse to trade if account leverage is too low, equity below a threshold, or broker is non-ECN. Check Inputs for 'MinLeverage', 'MinEquity', 'EcnMode'.
If the EA has a 'verbose' or 'debug' input, enable it temporarily. The log will print the actual filter decisions ('Signal blocked: ATR below threshold' etc).
рдЪрд░рдг 4: Check the Journal tab for broker rejections
If the EA tries to send orders but they don't appear in your positions, the broker is rejecting them. The Journal tab (View тЖТ Toolbox тЖТ Journal) logs every broker interaction including rejected orders.
Common broker-side errors:
тАв 'Trade context is busy' тАФ MT5 is already processing another order. Usually transient; the EA retries automatically.
тАв 'Off quotes' тАФ the price you tried to trade at is no longer available. Common during fast moves and news. Increase the EA's Slippage parameter or use market orders instead of limits.
тАв 'Invalid stops' тАФ the stop loss or take profit is too close to the current price. Broker has a minimum stop distance (usually 5-30 points depending on symbol). Check Symbol Specification тЖТ 'Stops Level' and adjust EA inputs accordingly.
тАв 'Insufficient margin' тАФ your account equity doesn't support the requested position size. Either reduce lot size or close other positions first.
тАв 'Market is closed' тАФ you tried to trade outside market hours. The EA should have checked this; if it didn't, the EA is buggy.
тАв 'Trade is disabled' тАФ broker-side restriction on this account/symbol. Contact broker support.
рдЪрд░рдг 5: Verify global AutoTrading is enabled
Two levels of AutoTrading must be on for an EA to trade:
1. Global тАФ the AutoTrading button in the main toolbar (small triangle icon). Click it once to toggle. Green means enabled.
2. Per-EA тАФ the 'Allow live trading' checkbox in the EA's Common tab.
If the global toolbar button is red/orange but the per-chart smiley is green, no trades happen тАФ global trumps per-chart. The status of global AutoTrading is also visible in the bottom-right corner of MT5.
Global AutoTrading can auto-disable in these scenarios: тАв Account change тАФ by default, switching accounts disables global trading as a safety guard. Re-enable manually. тАв Terminal restart тАФ global state usually persists, but on Windows update reboots it sometimes resets. тАв Crash recovery тАФ after a crash, MT5 may launch with global trading off. Check after every restart.
A simple production rule: on every MT5 restart, manually verify both the global toolbar button and each EA's smiley before walking away. Takes 30 seconds, catches the most common 'EA stopped trading overnight' scenario.
рдЪрд░рдг 6: Check for symbol naming mismatches
An EA hard-coded to trade EURUSD will silently exit OnInit if attached to a chart of a symbol your broker calls 'EURUSD.m' or 'EUR/USD'. The EA reads Symbol() in OnInit, compares to its expected name, and refuses to load if they differ.
Symptoms: the EA's first log message is something like 'Wrong symbol тАФ EA expects EURUSD, chart is EUR/USD' followed by silence. Sometimes the EA is silent entirely if the vendor didn't add the diagnostic log line.
Fix: тАв Confirm the actual symbol name in MT5's Market Watch. тАв Check the EA's documentation for the expected symbol name. тАв If they differ, look for an EA input like 'SymbolOverride' or 'TradeSymbol' that lets you specify. Set it to your broker's actual name. тАв If no override exists, contact the vendor тАФ most can patch the symbol check in a build update.
Broker-specific symbol naming gotchas: тАв XAUUSD vs GOLD vs XAU/USD vs XAUUSD.m тАв EURUSD vs EURUSD.m vs EURUSDi (i = institutional) тАв BTCUSD vs BTC/USD vs BTCUSD.cw (CryptoFX vs FX/CFD)
Always verify before deploying.
рдмрдЪрдиреЗ рдХреЗ рд▓рд┐рдП рд╕рд╛рдорд╛рдиреНрдп рдЧрд▓рддрд┐рдпрд╛рдБ
- тЬЧ Forgetting global AutoTrading after a restartрдареАрдХ рдХрд░реЗрдВ: After every MT5 restart, check the orange/green toolbar button before walking away.
- тЬЧ Logged in with investor password by mistakeрдареАрдХ рдХрд░реЗрдВ: Investor mode is read-only. The EA cannot place orders. Re-log with master password.
- тЬЧ Assuming silence = EA not signallingрдареАрдХ рдХрд░реЗрдВ: Enable the EA's Verbose/Debug input. The log will explain WHY the EA isn't trading (e.g. 'outside session', 'low volatility').
- тЬЧ Ignoring repeated 'Insufficient margin' errorsрдареАрдХ рдХрд░реЗрдВ: Your lot size is too large for current equity. Reduce risk percent or close other positions.
- тЬЧ Wrong symbol name тАФ EA hard-coded for EURUSD but chart is EURUSD.mрдареАрдХ рдХрд░реЗрдВ: Use the EA's SymbolOverride input or contact vendor for a patched build.
- тЬЧ Stop level below broker minimumрдареАрдХ рдХрд░реЗрдВ: Check Symbol Specification тЖТ Stops Level. Set EA's StopLoss to at least that distance.
рдЕрдХреНрд╕рд░ рдкреВрдЫреЗ рдЬрд╛рдиреЗ рд╡рд╛рд▓реЗ рдкреНрд░рд╢реНрди
My EA was trading fine yesterday but stopped overnight. What happened?
The diagnostic procedure: open the chart, look at the timestamp of the last journal entry тАФ that's when the EA last received a tick. Hours of silence usually means terminal restart or broker disconnect. Minutes of silence may just mean low-volatility market. The EA's own Verbose log usually says 'self-paused due to limit hit' or similar if that's the cause.
What do the common MQL5 error codes mean?
Errors map to root causes: 130-138 series are trade-context issues (broker rejected the order, retry with adjusted parameters), 4000 series are platform-level issues (connection, permissions), 5000+ series are file/network errors. Most retail EAs handle 130/138 with automatic retry; if you're seeing these in your log without traders complaining, the EA is handling them correctly.
Why does my EA stop trading every Friday afternoon?
Weekend gap risk is real тАФ Sunday-open price can be 100+ pips away from Friday-close price after major news. EAs that hold positions through the weekend can wake up Monday morning at a stop-out loss they couldn't possibly have prevented. The standard mitigation is to close all positions and disable new trades 30-60 minutes before Friday close. Most reputable EAs include this filter; some let you turn it off if you want to take the gap risk.
My EA gets 'Trade context busy' errors during news. How do I fix it?
The single trade context per terminal is an MT5 architectural choice that prevents race conditions. The fix is to either reduce concurrent EA trade requests (stagger EAs) or scale horizontally (one EA per terminal). Most EAs retry 'context busy' automatically; if yours doesn't, the vendor needs to add it. During news the spread also widens so retries usually fill at a worse price тАФ known trade-off.
My EA trades fine in demo but not in live. Why?
Cause (2) is more common than you'd think тАФ vendor anti-piracy systems sometimes check AccountInfoInteger(ACCOUNT_TRADE_MODE) and refuse to trade unless the account is licensed. Check the vendor's licensing portal that you've added your live account to the binding list. If yes, capture the EA's exact log output on both demo and live and email the vendor with both тАФ they can usually diagnose from the log diff in <24 hours.
After a margin call, can I just restart the EA and continue?
Margin calls happen when total open position margin requirement exceeds equity. Causes: (1) lot size too large per trade, (2) too many simultaneous positions (multi-symbol, grid, martingale), (3) leverage reduction by the broker (some brokers cut leverage during news from 1:30 to 1:5, instantly margin-calling positions sized for 1:30). After margin call: review per-trade risk %, set a portfolio-level max-position-count, and consider account-level daily-loss-limit script as a safety net.
Resolved the issue?
Export your account statement to share with broker support or attach to a vendor ticket. Five minutes, two clicks.
Continue to: How to export an MT5 trading report тЖТрд╕рдВрдмрдВрдзрд┐рдд рдЧрд╛рдЗрдб

William Harris
FxRobotEasy рдХреЗ рд╕рдВрд╕реНрдерд╛рдкрдХ рдФрд░ рд▓реАрдб рдбреЗрд╡рд▓рдкрд░
рд╢рд┐рдХрд╛рдЧреЛ, USA ┬╖ 2021 рд╕реЗ
- 12+ рд╕рд╛рд▓ рд▓рд╛рдЗрд╡ рдЯреНрд░реЗрдбрд┐рдВрдЧ
- 10+ рд╕рд╛рд▓ MQL5 / MQL4
- 3 рд▓рд╛рдЗрд╡-рд╕рддреНрдпрд╛рдкрд┐рдд Expert Advisors
- 2021 рдореЗрдВ рд╕реНрдерд╛рдкрд┐рдд
тАЬрдореИрдВ рдордзреНрдп рд╡рд┐рджреНрдпрд╛рд▓рдп рд╕реЗ рдХреЛрдб рдХреЗ рд╕рд╛рде рдЪреАрдЬреЗрдВ рдмрдирд╛ рд░рд╣рд╛ рд╣реВрдБред рдореИрдВ рд╡рд┐рд╢реНрд╡рд╡рд┐рджреНрдпрд╛рд▓рдп рд╕реЗ рдЯреНрд░реЗрдб рдХрд░ рд░рд╣рд╛ рд╣реВрдБред рдЙрди рджреЛ рджреБрдирд┐рдпрд╛рдУрдВ рдХрд╛ рдЪреМрд░рд╛рд╣рд╛ тАФ рдПрд▓реНрдЧреЛрд░рд┐рдердо, рдмрд╛рдЬрд╝рд╛рд░, рдФрд░ рдЙрдиреНрд╣реЗрдВ рдЬреЛрдбрд╝рдиреЗ рд╡рд╛рд▓реА рдкреНрд░реМрджреНрдпреЛрдЧрд┐рдХреА тАФ рд╡рд╣ рдЬрдЧрд╣ рд╣реИ рдЬрд╣рд╛рдБ рдореИрдВрдиреЗ рдкрд┐рдЫрд▓реЗ рдкрдВрджреНрд░рд╣ рд╡рд░реНрд╖ рдмрд┐рддрд╛рдП рд╣реИрдВред FxRobotEasy рддрдм рд╣реЛрддрд╛ рд╣реИ рдЬрдм рдЖрдк рддрдм рддрдХ рд░реБрдХрдиреЗ рд╕реЗ рдЗрдирдХрд╛рд░ рдХрд░рддреЗ рд╣реИрдВ рдЬрдм рддрдХ рдЖрдкрдиреЗ рдЬреЛ рдХрд▓реНрдкрдирд╛ рдХреА рд╡рд╣ рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ рд▓рд╛рдЗрд╡ рдмреНрд░реЛрдХрд░ рдЦрд╛рддреЗ рдкрд░ рдХрд╛рдо рди рдХрд░реЗредтАЭ