MT5 Magic Number: organise multiple Expert Advisors

A Magic Number is an identifier attached to trading activity by an EA. A good naming plan makes a multi-chart workspace much easier to understand and troubleshoot.

Use an identifier with a purpose

In the MQL5 Standard Library, SetExpertMagicNumber sets the expert identifier used by a CTrade instance. The number is not a password, activation key or exclusive reservation. Another program can use the same value; isolation depends on the code checking ownership correctly.

Give each strategy instance a clear identity

Create a small register containing EA name, version, chart symbol, timeframe and Magic Number. If the same strategy runs on two charts, use distinct identifiers when its design supports that separation. Preserve any reserved ranges documented by a multi-strategy EA rather than assigning arbitrary overlapping numbers.

Filter before managing a position

Source readers should find the position-selection logic before changing the identifier. Look for symbol and ownership checks, and whether modifications address a specific position ticket. On a netting account, strategies trading the same symbol can affect one combined position; different Magic Numbers do not create separate netting positions.

Verify with a small demo experiment

  1. Run two clearly labelled instances on demo charts.
  2. Inspect their orders, deals and positions after a signal.
  3. Confirm that an exit or trailing action touches only its intended scope.
  4. Save the identifiers with the presets so a restart does not create confusion.

Make it yours with MQLume

MQLume source access lets you understand how a project identifies and manages its trades. Explore the parameter guide for Quantum Commander MT5 before planning a multi-strategy workspace.

Sources and further reading

Back to top

Inspect the source projects

Review the delivered release, input guide and documented testing scope for each package.

Quantum Titan MT5The Gold Reaper MT5My AI Gold MT5Ultimate Breakout System MT5Quantum Commander MT5

Cart

One personal-use licence per project. Each project can be added once.

Your cart is empty

Choose a source project to get started.

Continue shopping