MT5 expert advisor log errors explained: using the Experts and Journal tabs to find what went wrong

9 min read

Where MT5 records expert advisor messages, how the Experts and Journal tabs differ, and how to read their entries to sort an EA problem into permissions, symbol or order errors.

MT5 expert advisor log errors explained: using the Experts and Journal tabs to find what went wrong

Where MT5 expert advisor errors actually appear

MT5 writes expert advisor messages to two places: the Experts tab, which holds what the EA itself prints and the trade errors it reports, and the Journal tab, which holds what the terminal does (connections, loading and removing EAs, order requests and server responses). Both live in the Toolbox window at the bottom of the terminal (View >> Toolbox, or Ctrl+T). Reading the two side by side usually tells you whether a silent or failing EA has a permissions problem, a symbol problem or an order problem, before you touch a single input.

This guide is about reading those messages. If you need the basics of what an EA is or how to set it up, start with the guide to MT5 expert advisor settings for beginners. Here we assume the EA is on a chart and something is not behaving.

Automate this on MetaTrader 5

A MetaTrader 5 expert advisor with documented inputs, full backtest settings and clear risk limits.

Instant deliverySecure payment97% satisfactionLifetime access

Experts tab vs Journal tab: what each one records

The Experts tab

The Experts tab shows output generated by MQL5 programs running in the terminal. That includes:

  • Messages the developer wrote with Print() or similar functions, such as initialization notes, filter decisions or input warnings.
  • Errors returned when the EA sends a trade request and the request fails, if the code logs them.
  • Initialization failures, for example when OnInit returns a failure because an input is out of range.

How much you see depends on the developer. A well-documented EA logs why it skipped a trade (spread too wide, outside session hours, maximum positions reached). A poorly written one may log nothing, which is itself useful information.

The Journal tab

The Journal tab records terminal events independent of any EA's code:

  • Connection and authorization to the trade server, and disconnections.
  • Expert advisors being loaded, removed or failing to load on a chart.
  • Changes to algorithmic trading permission.
  • Order requests sent to the server and the result, such as accepted, rejected or failed with a reason.

A practical rule: the Journal tells you what the platform and the broker did, the Experts tab tells you what the EA thought. When an order fails, you will often see the request and server response in the Journal and the EA's own interpretation in the Experts tab.

Opening older logs

Both tabs show the current session. Right-click inside either tab to find options for opening the log folder or viewing logs from a previous date. On disk, the terminal log is in the Logs folder and the EA log is in MQL5\Logs, both under File >> Open Data Folder. Files are named by date, so if an EA misbehaved overnight on EURUSD, open the file for that date rather than scrolling the live tab.

The Strategy Tester has its own Journal tab inside the tester window. Messages from a backtest do not appear in the main terminal tabs, so check there when debugging a test run. The walkthrough on how to test an expert advisor in MT5 covers the tester side.

A three-bucket method for EA troubleshooting

When an EA does nothing or fails, sort the log message into one of three buckets. Each bucket has a different fix, and mixing them up wastes time.

Bucket 1: permissions

Symptoms: no trades at all, no trade errors in the Experts tab, or messages that mention trading being disabled.

What to look for:

  • Return code 10027, described as autotrading disabled by the client terminal. The terminal-level Algo Trading button in the toolbar is off.
  • Return code 10026, autotrading disabled by the server. This comes from the broker side, often on an investor (read-only) login or an account type that blocks EAs. Contact the broker; nothing in the EA will fix it.
  • Return code 10017, trade disabled, which can apply to the whole account or a specific symbol.
  • Journal lines showing the EA was removed or failed to load, which can follow a terminal restart or a profile change.

Checks, in order:

  1. The Algo Trading button in the main toolbar is enabled.
  2. In the EA properties, on the Common tab, algorithmic trading is allowed for that EA.
  3. Tools >> Options >> Expert Advisors: confirm algorithmic trading is allowed globally and check whether options that disable it on account or profile change are ticked.
  4. If the EA needs DLL imports or web requests, those permissions are granted. For web requests, the URL must be in the allowed list in the Expert Advisors options.
  5. The icon in the top-right corner of the chart shows the EA as active. Check the MetaTrader 5 help for what each icon state means in your build.

The official MetaTrader 5 help on algorithmic trading and the platform settings page describe these switches.

Bucket 2: symbol

Symptoms: the EA initializes but never reacts, logs an unknown symbol, or trades the wrong instrument.

Common causes:

  • Broker suffixes. Your broker may list EURUSD as EURUSD.m, EURUSDpro or similar. An EA that hardcodes EURUSD, or a set file built on another broker, may reference a symbol that does not exist on your server.
  • Symbol not in Market Watch. Some EAs, especially multi-symbol ones, need every traded symbol visible in Market Watch to receive prices. Right-click Market Watch >> Symbols to add them.
  • Wrong chart. An EA designed for an index CFD or a futures symbol on a broker's feed will not behave correctly on EURUSD. Read the developer notes for the intended instrument and timeframe.
  • Session closed. Return code 10018, market closed, means the symbol is not trading at that moment. CFDs on ES or NQ follow the broker's session times, which can differ from the CME Group schedule.

Checks: right-click the symbol in Market Watch >> Specification and compare the exact name, trading sessions, contract size and digits with what the EA expects. If the EA has a symbol input, see how to change MT5 expert advisor inputs for where that lives and when changes apply.

Bucket 3: order

Symptoms: the EA clearly tries to trade (you see a request in the Journal or a message in the Experts tab) but the order is rejected.

Common return codes and what to check:

  • 10014, invalid volume. The lot size is below the minimum, above the maximum, or not a multiple of the volume step. Compare the EA's lot calculation with Volume min, max and step in the symbol specification. A risk-based EA on a small account may compute 0.003 lots when the minimum is 0.01.
  • 10016, invalid stops. The stop loss or take profit is too close to price. Check the stops level and freeze level in the specification. On a broker with a stops level of 30 points on a CL CFD, an EA placing a 15-point stop will be rejected.
  • 10015, invalid price. The price in the request is stale or wrong, often during fast markets or with pending orders placed on the wrong side of price.
  • 10019, not enough money. Free margin is insufficient for the requested volume. Check margin requirements and existing open positions.
  • 10030, unsupported filling type. The EA requests a filling mode the symbol does not allow. Specification shows which filling modes are permitted; the fix usually sits in the EA code or an input, so it may need the developer.
  • 10004 or 10006, requote or request rejected. These come from the execution side and can be intermittent. Note the time and frequency before blaming the EA.

Write down the exact code and text. Developers can act on 10016 at 14:32 on NQ with a stop distance of 8 points; they cannot act on the EA does not work.

A practical reading routine

When something looks wrong, run through this sequence:

  1. Open the Journal. Confirm the account is connected and authorized, and that the EA loaded on the expected chart without errors.
  2. Open the Experts tab. Read the initialization messages. Many EAs print their key inputs at startup, so you can confirm the right preset loaded.
  3. Find the first error, not the last. One failed initialization can cascade into many later messages.
  4. Match any return code to one of the three buckets.
  5. Check the symbol specification for the relevant limits before changing EA inputs.
  6. Change one thing, then watch the next attempt in both tabs.

If the EA logs skipped signals for reasons like spread or session filters, that is not an error. The logic is working as designed. Our article on MT5 expert advisor risk settings explains those safeguards.

When the logs are empty

If neither tab shows anything from the EA, check that it is actually attached: the chart corner should show the EA name and icon. If it is attached but silent, the EA may simply not log its decisions. This is a fair criterion when evaluating an EA. An MT5 expert advisor with documented inputs and clear log messages is far easier to troubleshoot than one that runs as a black box.

Conclusion

MT5 expert advisor log errors are rarely mysterious once you know where to read them. The Journal shows what the terminal and broker did, the Experts tab shows what the EA reported, and most failures fall into permissions, symbol or order problems. Note the exact return code, check the symbol specification, change one thing at a time, and you will usually find the cause quickly. Clean logs do not mean a strategy is sound, only that the EA is running as coded, so keep evaluating behavior separately.

FAQ

Can I clear the Experts or Journal tab without losing the logs?

Clearing the tab view does not delete the daily log files on disk. You can still open them from the Logs and MQL5\Logs folders under File >> Open Data Folder.

Why does my EA log errors on a demo account but not on live, or the reverse?

Demo and live servers can have different symbol names, stops levels, filling modes and volume limits. Compare the symbol specification on both accounts before assuming the EA changed.

Are log files safe to send to an EA developer?

They typically include your account number, server name and trade activity. Review the file and remove anything you are not comfortable sharing before sending it.

Do log files grow forever?

MT5 creates a new log file per day, so old files accumulate over time. You can archive or delete older dated files once you no longer need them for troubleshooting.

If you want an EA built with documented inputs and readable log messages, explore the MT5 expert advisor at SierraOnShop.

Run it in MetaTrader 5

Clement

Written by

Futures trader for more than seven years, specialized in order book and order flow scalping on US index futures, now building automated strategies. Founder of SierraOnShop.

More about the author

Ready to run an expert advisor?

A MetaTrader 5 expert advisor with documented inputs, full backtest settings and clear risk limits.

Instant deliverySecure payment97% satisfactionLifetime access