Specification
When ordering or developing a trading robot, you need to formulate requirements: tasks to be performed by the robot, conditions under which it will operate, response to incidents and emergency situations, required control methods, etc. Trading robots are programs, which should strictly follow the underlying logic. In order to program the algorithm of actions, you should prepare its detailed description.
Description of a trading strategy is provided in the form of Requirements Specification. The more details you provide, the less misunderstanding will occur between you (the Customer) and the programmer (the order Developer).
The important part of Requirements Specification for an Expert Advisor is presentation of clear formal trading rules. Even if you are not ordering an EA, but want to develop one yourself, you should start with the definition of these rules. Prepare the Requirements Specification and include the EA testing/optimization related points. Add hypotheses, which you will use to check the quality and stability of your trading strategy, describe criteria for selecting the optimal parameters and explain why you consider them important.
Include all EA development stages to the Requirements Specification — this will make the algorithm idea clear for the Developer, and will help you recall the details weeks, months, or even years later. Algo trading is not a hobby, but a thorough research path, all stages of which need to be properly documented. A trading system development diary will be very useful whenever you'll need to test a new idea.
Requirements Specification examples
Here is an example of Requirements Specification for the development of the MACD Sample Expert Advisor, which is available in the MetaTrader 5 standard package.
1. The idea of the trading system is as follows: market entries are performed when MACD's main and signal lines intersect in the current trend direction.
2. Trend is determined based on the Exponential Moving Average with the specified period (InpMATrendPeriod). If the current EMA value is greater than the previous one, the trend is seen as growing (ema_current > ema_previous). Alternatively, if current EMA is below the previous one, the trend is considered to be falling (ema_current< ema_previous).
3. Trading Signals: