Lesson 710–12 minBeginner–Intermediate

Journaling and Logging in MetaTrader 5

Read platform logs, decode common errors, track your trade history, export reports, and build a simple review routine to improve faster.

No signup needed • Progress saved locally
Learning Objectives
  • Locate and use Journal and Experts tabs in Toolbox
  • Interpret common errors and message codes and know what actions to take
  • Navigate the History tab, periods, and report views
  • Export trade history (HTML/CSV) and perform a basic trade analysis

1. Journal vs Experts: where and what

MT5 logs platform events and EA messages in two separate tabs.

Toolbox → Journal tab:

Platform-level messages, connections, orders, errors, system info.

Toolbox → Experts tab:

Messages from Expert Advisors/Scripts (if used), including custom logs and trade operation results.

How to read:

  • Each line shows time (server time), source, and message text. Severity may be highlighted.
  • Use the search field to filter by symbol, "error", "order", or ticket number.
  • Right-click to open log files folder or clear the view (varies by build).

What you'll find:

Journal: Connection states (connected, no connection), trade requests and fills, "modify order", "position closed", "market closed", etc.

Experts: EA initialization/deinitialization, parameter prints, trade result codes.

TipWhen to use
After order rejections or unexpected behavior; when debugging entries/exits; when verifying that SL/TP modifications were accepted.

Screenshot Coming Soon

Toolbox Journal tab

Platform log with timestamps (placeholder).

Screenshot Coming Soon

Toolbox Experts tab

EA/script messages and retcodes (placeholder).

2. Reading errors and message codes

Understanding common errors helps you react quickly and fix issues.

"Invalid stops" or "SL/TP too close"

Meaning: Your Stop-Loss/Take-Profit is inside the symbol's Stop level.

Fix: Place SL/TP further from current price; see Stop level in Specifications (Lesson 4).

"Not enough money"

Meaning: Margin requirement exceeds free margin.

Fix: Reduce lot size, increase leverage responsibly, or add funds; check margin calculation (Lesson 4).

"Market closed" or "Trading disabled"

Meaning: Symbol outside trading hours or disabled by broker.

Fix: Check Trading hours in Specifications; try again during sessions.

"Off quotes" / "Price changed" / "Requote"

Meaning: Requested price unavailable (volatility, Instant/Request execution).

Fix: Use Market execution, increase allowed deviation, or retry.

"Trade context busy"

Meaning: Previous trade operation still processing.

Fix: Wait a moment and retry; avoid rapid repeated commands.

Numeric/retcodes (typical MT5 trade results):

CodeMeaning
TRADE_RETCODE_DONE/PLACEDSuccess (order placed or executed).
TRADE_RETCODE_INVALID_STOPSSL/TP distances invalid.
TRADE_RETCODE_NOT_ENOUGH_MONEYInsufficient margin.
TRADE_RETCODE_MARKET_CLOSEDSession closed.
TRADE_RETCODE_PRICE_OFFPrice changed/off quotes.
TRADE_RETCODE_TRADE_DISABLEDTrading disabled for symbol/account.
TipFor EA users
For EA users (future Lesson 8), log result.retcode and comment fields in Experts to diagnose issues precisely.

Screenshot Coming Soon

Common error messages

Examples of typical errors and how to react (placeholder).

3. Trade History and reports

Track all your trades and analyze performance in the History tab.

Where:

Toolbox → History tab.

Periods:

Right-click → All History, Last 3 Months, Last Month, Today, or Custom period to specify dates.

Views:

Right-click in History to switch between Deals, Orders, Positions (available modes vary by build); use what matches your review style.

Details:

Double-click an entry (or use context menu → Details) to see order/deal info: volume, price, SL/TP, commission, swap, comment, magic (for EA), and timestamps.

Columns:

Customize visible columns (ticket, symbol, type, lots, price, SL, TP, commission, swap, profit). Use comments to tag strategies or reasons for entries.

Screenshot Coming Soon

History tab with custom period

Switching periods and views (placeholder).

Screenshot Coming Soon

Deal/order details

Inspecting SL/TP, commission, swap (placeholder).

4. Exporting history and basic analysis

Export your trade data for deeper analysis in spreadsheets.

Export:

  • Right-click History → Save as Report (HTML). Many builds also support Export to Excel/CSV; otherwise copy rows (Ctrl+C) and paste into a spreadsheet.
  • Saved reports include summary metrics (total trades, profit factor, expected payoff, drawdown), depending on build/version.

Quick analysis workflow:

In a spreadsheet, compute:

Win rate: winning trades / total trades

Average win and average loss: sum of wins / count, sum of losses / count

Risk:Reward: average win / average loss

Expectancy: (win rate × avg win) − ((1 − win rate) × avg loss)

Max consecutive losses: count longest losing streak

Group by symbol, session hour, day of week, or strategy tag (from Comments) to find edges and mistakes.

Archiving:

Save monthly reports and keep a changelog of settings or system tweaks (reference Lesson 6 system template).

Screenshot Coming Soon

Save as Report menu

Exporting trade history (placeholder).

5. Best-practice workflow for logging and review

Build a consistent routine to improve your trading over time.

Daily:
  • Check Journal for connection or execution errors.
  • Add clear comments on each trade entry about setup/reason and system name.
Weekly:
  • Export History for the week; update your spreadsheet.
  • Review key metrics (win rate, R:R, expectancy) and 3 annotated trades (best, worst, typical).
  • Adjust your checklist for next week (Lesson 5 risk controls, Lesson 6 system rules).
Monthly:
  • Save a monthly HTML report and back it up.
  • Note system changes in a simple changelog.
Safety
Educational content only. No guarantees of performance. Review on a demo account first.
Hands-on Checklist
0%

Your progress is saved locally — no signup required.

Frequently Asked Questions

Knowledge Check

Lesson 7 Quiz

Test your understanding with 5 questions. Pass with 4/5 correct.

Resources

What's Next?

You've mastered MT5's logging system: Journal and Experts tabs, error codes, trade history, exports, and a review routine. In Lesson 8, we'll cover Expert Advisors: installation and permissions.

Back to Lesson 6

This material is for educational purposes only and is not investment advice. Trading involves risk of capital loss. Your capital is at risk.