MT5 order comments in trade history, and how to use them as labels

Platform markers, expert advisor text and your own codes: what is reliable, what is not and when a journal is the better place.

Every deal in your MetaTrader 5 history has a Comment column, and most traders never look at it. That is a missed opportunity, because the comment tells you how the trade was closed, whether an expert advisor was involved, and sometimes which strategy or signal opened it. This page explains where comments come from, how to read the common ones, how to use them as a lightweight labelling system, and where they stop being reliable.

Where comments come from

A comment can be written by three different parties. The platform itself adds short markers when a stop loss, a take profit or a stop out closes a position; these are described on MT5 history comments for SL, TP and SO. An expert advisor or script can set any text it likes when it sends an order, which is how many automated strategies label their trades. And you, when you place a trade manually, can sometimes type a comment in the order window, depending on your build and the order dialog. The broker may also add its own text to balance rows or corrections.

SourceTypical commentHow reliable
PlatformA marker for stop loss, take profit or stop outReliable, standard wording
Expert advisorStrategy name, version or signal IDAs reliable as the EA’s author
You (manual)Free text, if your order window allows itOnly as consistent as you are
BrokerWording for fees, corrections, transfersVaries by broker

Comments versus the magic number

Expert advisors usually also set a magic number, an integer that identifies which EA opened the order. Comments are easier to read but easier to lose: the length is limited, some servers shorten or modify them, and a partially closed position can show a different comment on each deal. The magic number is the sturdier identifier, as covered in magic number in trade history. A sensible rule is to filter by magic number where it exists and use comments as a human-readable hint.

Using comments as labels

Why comments go missing or change

Three common surprises. A position closed in two parts has two exit deals, and each can carry a different comment, so the entry deal may say one thing and the exit another. A pending order that triggers can pass its comment to the deal in a slightly changed form, which is why a label may seem to vanish after the fill. And a few brokers rewrite comments for internal bookkeeping. If you depend on a label, test it: place a small demo order with your comment and look at the order, the deal and the position in the History tab. The IDs that tie them together are explained on deal, order and position IDs.

A worked example (hypothetical)

A trader runs one EA and trades manually in between. The EA labels its orders with a strategy name and a magic number. Manual trades have an empty comment. In a month with 50 closed positions, filtering by magic number shows 31 EA trades and 19 manual ones. The trader then sorts the 19 manual ones by the comment marker typed at entry, discovering that trades labelled as late-session entries account for most of the losses. Nothing here is a claim about any strategy, and every number is invented; the point is that a short label turned an undifferentiated list into groups that can be reviewed.

Where a journal does better

A comment field is a single short line. A journal can hold the setup, the emotion, whether you followed the plan, a rating, tags, a longer note and a screenshot. AI Trading Journal is a Windows app for MetaTrader 5 only; it reads closed trades from the terminal every 5 minutes and lets you add those fields to each entry, with search and filters, in a file on your own PC. It is read-only: it does not change anything on the broker side or place orders. Notion is an optional extra copy. For the idea of consistent labels, see how to tag trades.

Limits and cautions

Frequently asked questions

What is the Comment column in MT5 history?
A short text attached to an order or deal. It can come from the platform, an expert advisor, you or the broker.
Can I add my own comment to a manual trade?
Often yes, depending on your build and order window. Test with a demo order.
Why does the entry comment differ from the exit comment?
Each deal is separate, and the closing deal usually carries a marker for how the position was closed.
Is the comment safer than the magic number?
No. The magic number is the sturdier identifier for EA trades; comments are a readable hint.
Can I label trades in the journal app too?
Yes. Each entry has setup, tags and notes with search and filters, kept in your own journal file.

Related guides

Add setup, emotion and notes to every trade: free for 7 days

Free for 7 days, no card required. After that, a one-time $19.99 purchase. No subscription. Also on the Microsoft Store.

One-time $19.99, no monthly fee · your MT5 login never leaves your PC · trades go into your own journal on your PC, not through our servers.

Start free 7-day trial