洞察
MetaTrader オートメーション6 最小読み取り時間2026年5月25日

What Is a Magic Number in MetaTrader and Why It Matters

Magic numbers help MetaTrader tools identify which positions belong to which EA or workflow.

この記事は現在英語でご覧いただけます。さらに多くの翻訳が追加されています。

A small number with a big job

In MetaTrader, a magic number is an identifier that an Expert Advisor can attach to trades it opens. The number helps the EA recognize its own positions later.

This matters because an account may contain manual trades, multiple EAs, copied trades, and different strategies. Without clear filtering, a tool may manage positions it was not meant to touch.

Where magic numbers matter

Magic numbers are especially important for trade management, dashboards, risk tools, and reporting. They let the software answer a basic question: does this position belong to me?

Manual trades normally do not have the same EA magic number, so tools need settings for whether manual positions should be included, excluded, or handled separately.

  • Separate one EA's trades from another EA's trades.
  • Filter copied trades from manual trades.
  • Apply management rules only to selected positions.
  • Improve logs and strategy review.

Common mistakes

A common mistake is running multiple EAs with the same magic number on the same account without understanding the effect. Another is expecting a management tool to know which trades matter without configuring filters.

Symbol filters, comment filters, and manual-trade options may also be needed depending on the workflow.

Filtering is part of risk control

A tool that manages the wrong trade can create serious workflow problems. Magic-number planning helps keep automation scoped to the positions it is meant to support.

If you need a custom EA, TradingView indicator, Pine Script alert tool, trade copier, Telegram workflow, dashboard, or scanner, Swiftfolio Automation can help map and build the tool.

Trading involves risk. Swiftfolio Automation tools do not guarantee profit and do not provide financial advice.

Swiftfolio のアップデート

取引自動化に関する洞察を得る

Swiftfolio Automation から実践的な取引自動化の洞察、製品の最新情報、リスク管理コンテンツを入手してください。