Skip to content
All library documents

How to Specify, Test, and Commission a Custom Expert Advisor

Article MQL5 articles

Summary

This guide walks traders through preparing to commission an Expert Advisor (EA). It recommends evaluating a strategy before paying for automation, while accounting for repainting or delayed indicator signals, changing market conditions, and differences between demo and live execution. It then explains how to turn a trading idea into precise rules, including signal timing, position limits, stops and targets, sizing, handling repeated signals, restarts, and errors.

A moving-average crossover example shows how vague requirements lead to different interpretations, such as whether positions close on an opposite signal and whether signals use forming or completed bars. The example also covers isolating an EA’s trades with a magic number. For delivery, the trader is advised to compare behavior against the specification in a strategy tester, inspect visual testing where tick-by-tick behavior matters, and then use a demo account. The article offers a practical process rather than evidence that a particular strategy is profitable; demo results may not match live execution, and the historical contact list is not a verified endorsement.

Key ideas

  • Evaluate a strategy before commissioning an EA, and account for live-market conditions that tests may miss.
  • Specify signal timing, position management, sizing, stops, targets, and exceptional cases explicitly.
  • A moving-average crossover example shows how omitted rules create different EA behaviors.
  • Use trade identifiers so an EA can manage its own positions without interfering with others.
  • Check the delivered EA against the specification in a tester, visually when needed, and on demo before acceptance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.