Order comments and what they give away
Every order can carry a comment, a short text field. Expert advisors use them to tag trades with strategy names or identifiers. The field is visible to the broker and sometimes passed along in the trade record.
That has small privacy implications. A comment like "scalp_v3_breakout" tells the broker's back office what kind of strategy is running. If their risk team looks for patterns, a consistent comment makes the account easy to classify.
Magic numbers, the integer identifiers used by MetaTrader expert advisors, do something similar. They're meant for internal bookkeeping, but they remain attached to the trade.
Whether any broker acts on this information is unknowable from outside. But there's no reason to give away structure for free. Neutral or blank comments, and numbers that aren't obviously meaningful, are a minor precaution at no cost.
A more practical reason to care is conflicts. Two scripts using the same magic number on the same symbol can interfere with each other, closing each other's trades.
Keeping a simple register of identifiers avoids that kind of mess.
Any naming scheme for order comments and magic numbers that has avoided conflicts?
Order comments and what they give away
Order comments and what they give away
It’s Fairman 
-
FXS HongKong Scalper
- Posts: 543
- Joined: Sat Oct 24, 2026 10:15 pm
Re: Order comments and what they give away
Interesting angle. Leaving comments empty, or using a neutral short code that maps to a strategy name in a local file, keeps the journal useful without telling the back office anything.
FXS Official Team | Hong Kong Session Desk
-
Amanhasnoname
- Posts: 2060
- Joined: Fri Oct 30, 2026 9:45 am
Re: Order comments and what they give away
Two of my EAs once used the same magic number on GBPUSD for almost a week before I noticed, and the damage was exactly what you describe. The breakout script would open a position and the mean reversion script, seeing a trade with "its" number, would manage it with its own trailing logic and close it early. I only caught it because the journal showed exits that matched neither strategy's rules.
What I do now is build the number from parts. The first two digits are the strategy, the next two are the symbol from a short list I keep in a text file, and the last digit is the version. So every EA on every chart gets something unique, and I can still decode it at a glance when I read the history export.
For comments I gave up on names entirely. Each one is just a three letter code that means nothing outside my spreadsheet, and the spreadsheet is the only place the mapping lives. My journal stays readable for me and the broker sees noise.
What I do now is build the number from parts. The first two digits are the strategy, the next two are the symbol from a short list I keep in a text file, and the last digit is the version. So every EA on every chart gets something unique, and I can still decode it at a glance when I read the history export.
For comments I gave up on names entirely. Each one is just a three letter code that means nothing outside my spreadsheet, and the spreadsheet is the only place the mapping lives. My journal stays readable for me and the broker sees noise.
Re: Order comments and what they give away
FXS HongKong Scalper wrote: Thu Nov 12, 2026 3:22 pmInteresting angle. Leaving comments empty, or using a neutral short code that maps to a strategy name in a local file, keeps the journal useful without telling the back office anything.
The separation between privacy and safe automation is important. Blank comments remove a readable label, but the trade record still carries symbol, side, lot size, timing, and the magic number, so I would not treat a neutral code as secrecy from the broker. For conflicts, uniqueness is the hard requirement. A compact scheme such as strategy 12, symbol 04, version 2 gives 12042; reserving distinct strategy ranges avoids two EAs claiming the same ID. Before running it live, I would export a small demo batch and check that each script only closes or modifies its own orders, including after a restart or partial close. Then keep the mapping in a local journal outside the order comment. That keeps the audit readable without advertising a strategy name. The goal is fewer accidental cross-management errors, not assuming a broker cannot infer anything from execution.
It’s Fairman 