EA-24015 · Utility

The Singleton

This EA implements the Singleton design pattern for MQL5 Expert Advisors, ensuring only one instance of the EA can run on a terminal at a time. It prevents duplicate instances from executing simultaneously, which could cause conflicting trades or resource conflicts. The core functionality is a protective utility mechanism rather than a trading strategy.

Open the interactive view (equity curve, symbol switch)

Key facts

CategoryUtility
RiskSafe
Rating★★☆☆☆
TypeUtility tool
TimeframesM1, M5, M15, M30, H1, H4, D1
IndicatorsNone
AuthorCopyright © LukeB

Backtest results (H1, about 1 year)

Not backtested yet — this EA could not be converted automatically.

Strategy analysis

This EA implements the Singleton design pattern rather than a trading strategy, ensuring only one EA instance runs per terminal. Entry conditions are not applicable since the EA does not execute any trades. Exit conditions are similarly not applicable; the EA only monitors and blocks duplicate instances. Position sizing is not involved as there is no trade-opening behavior. Money management is irrelevant since the EA does not handle any capital-related logic. The mechanism typically uses global variables, file-based locks, or chart scanning to detect and prevent duplicate instances from running simultaneously, protecting against conflicting orders or resource contention.

Strengths

  • Prevents trade conflicts caused by multiple EA instances running simultaneously
  • Provides architectural-level protection reducing risk of human operational errors
  • Simple and effective implementation without adding complexity to trading logic

Weaknesses

  • Does not execute any trading strategy, serving only as an auxiliary utility
  • May prevent legitimate multi-symbol deployment of the same strategy
  • Lacks detailed configuration options, limiting flexibility

Possible improvements

  • Add a whitelist feature allowing multiple instances on specific symbols or charts
  • Add logging functionality to record instance creation and blocking events

Risk assessment

Overall risk: Safe

  • Failure of the blocking mechanism could lead to multi-instance conflicts
  • Lack of persistent logging for blocked instance events

Evaluation scores

Code quality3.0
Strategy logic2.0
Risk management4.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
Singleton EnabledtrueEnable singleton mode protection
Alert on DuplicatetrueAlert when duplicate instance detected

Similar Utility EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.