BullsEdges algo trading guide: MetaTrader's logs tell you exactly what an EA and the terminal did and why. Learn where they are, what the common messages mean, and how to use them.
When an Expert Advisor does something unexpected - or does nothing at all - the answer is almost always in the logs. MetaTrader 5 keeps two of them, and learning to read them saves hours of guessing.
BullsEdges algo trading application: Start an investigation with timestamps and ticket numbers in the Journal and Experts logs, then match them to the account history.
The two logs
- Journal tab: the terminal's own log. Connection, login, order execution, errors from the trade server, platform updates.
- Experts tab: messages from EAs and scripts - everything an EA prints, plus load and unload events.
Both are in the Toolbox (Ctrl+T). Right-click and choose Open to see the log files on disk, one per day. On a VPS, these files are the best record of what happened overnight.
Useful Journal messages
- "authorized on [server]" - the account logged in successfully, with the ping.
- "connection lost / no connection" - the terminal lost contact with the broker.
- "order ... done" - an order was executed, with the price.
- "failed ... [Invalid stops]" - stop loss or take profit too close to price (inside the broker's stops level).
- "failed ... [Not enough money]" - not enough free margin for the order.
- "failed ... [Market is closed]" - outside trading hours for the symbol.
- "trade disabled" - often a read-only investor login.
- "invalid request" on a cancel - commonly harmless: the EA tried to delete a pending order that had just been filled or removed.
Useful Experts messages
- "expert ... loaded successfully" and the list of inputs read - the best way to confirm which settings are active.
- "removed" - the EA was removed from the chart, sometimes because of an error.
- Messages the EA prints itself, such as "news pause until 14:30" or "basket closed".
How to use the logs
- Start with the time. Find the moment something went wrong in the account history, then look at both logs at that time.
- Match order tickets. The Journal lists ticket numbers that match the History tab.
- Look for repeated errors. One "not enough money" is information; hundreds per minute mean the EA is retrying on every tick and should back off.
- Check after updates. After changing an EA or its inputs, read the "inputs read" line to confirm the values.
Ask for better logging
A well-written EA tells you why it is not trading: "spread too wide", "outside session", "news pause: CPI at 15:30". If your EA is silent, ask the developer for these messages, or add them yourself. Logging once when a state changes (not on every tick) keeps the file readable.
Keep the files
On a VPS, keep log files for at least a few weeks. When live results differ from a backtest, the logs are the ground truth of what the EA actually saw and did.
BullsEdges takeaway for algo trading
The logs are MetaTrader's black box recorder. Read them first whenever anything looks wrong.
Trading forex and gold carries a high level of risk and may not be suitable for every investor. Past performance and backtests do not guarantee future results. This article is education, not financial advice.
