Discussion of article "How to create Requirements Specification for ordering a trading robot"

 

New article How to create Requirements Specification for ordering a trading robot has been published:

Are you trading using your own strategy? If your system rules can be formally described as software algorithms, it is better to entrust trading to an automated Expert Advisor. A robot does not need sleep or food and is not subject to human weaknesses. In this article, we show how to create Requirements Specification when ordering a trading robot in the Freelance service.

Why is it important to have a well-prepared Requirements 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:

  • Buy signal: the main MACD line crosses the signal line upwards (macd_current>signal_current && macd_previous<signal_previous).
  • Sell signal: the main MACD line crosses the signal line downwards (macd_current<signal_current && macd_previous>signal_previous). The below figure shows Buy and Sell cases.


4. Positions are closed at opposite signals: Buy positions are closed at Sell signals, and Sell positions are closed at Buy signals.

5. Positions are opened at the market price, when a new bar emerges. The Expert Advisor is to be tested using Open prices, so there is no need to add functions for disabling operations inside the bar.

6. Additional filters for opening a position:

The absolute value of MACD's main line will be used to filter out weak signals: the signal is only confirmed if this value is greater than open_level (in points). Signal confirmation conditions are as follows:

  • Confirmation of a buy signal: Abs(macd_current)>open_level
  • Confirmation of a sell signal: macd_current>open_level

7. Additional filters for closing a position:

The absolute value of MACD's main line will also be used to confirm position closure: the signal is confirmed if this value is greater than close_level (in points). Close signal confirmation conditions are as follows:

  • Confirmation to close Buy positions — macd_current>close_level
  • Confirmation to close Sell positions — Abs(macd_current)>close_level

8. Close by Take Profit — during position opening, a Take Profit level is set at a fixed distance from the open price, specified in points. The value is set in the InpTakeProfit input parameter.

9. Position management

TrailngStop is used to protect profit. Stop Loss is set if profit in points exceeds the value specified in the InpTrailingStop parameter. If the price continues to move in the profit direction, Stop Loss should be trailed at the given distance. Stop Loss cannot be moved towards the loss direction, i.e. the Stop Loss value cannot be increased. If none of protective orders (Take Profit or Stop Loss) triggers, the position should be closed by an opposite signal. No other position exit methods are available.

Author: MetaQuotes Software Corp.

 
Thank you, much appreciated and I hope we all profit from the increase in knowledge. Bless!
 
Humbledracsansh:
Thank you, much appreciated and I hope we all profit from the increase in knowledge. Bless!
thanks you
 
Which data formats are allowed for specification file? PDF and word are not allowed. JPG is allowed but not comfortable if you have a long description.
 
baerliner:
Which data formats are allowed for specification file? PDF and word are not allowed. JPG is allowed but not comfortable if you have a long description.

We can speak German here. :)

Text can simply be posted as text. See the edit line. Under Aa you will find various. Format templates and code always with Ctrl+S.

 

The above is about the specifications for freelancers. I have currently placed 2 simple jobs. I'm now at the point where I have to select a programmer for each job and attach the specifications next to the price and time. Here he only takes JPG files. For the first job, I simply saved my requirements as a hard copy in jpg format. I could process the 2nd order in a similar way. But I have another job in mind. Graphics are necessary here. The exact description would take several pages. As this is all very time-consuming, I would like to do it in the right format. So which format should I use for the specifications?

 
baerliner:

The above is about the specifications for freelancers. I have currently placed 2 simple jobs. I'm now at the point where I have to select a programmer for each job and attach the specification next to the price and time. Here he only takes JPG files. For the first job, I simply saved my requirements as a hard copy in jpg format. I could process the 2nd order in a similar way. But I have another job in mind. Graphics are necessary here. The exact description would take several pages. As this is all very time-consuming, I would like to do it in the right format. So which format should I use for the specifications?

Probably zip files - I have never placed an order before.
 
Doesn't it say which files can be uploaded?
 
Zip files are the magic word. Thank you. That did the trick. Hey, why don't you write that behind it? :-) And perhaps you could take this opportunity to update the descriptions on the subject of freelancing. Unfortunately, they are no longer up to date. It must still be the previous version, as the description and screenshots don't really match what it currently looks like. Hence my stupid enquiries. But the idea behind the programming service is really great. I hope that the two orders will also be fulfilled well.
 
baerliner:
Zip files are the magic word. Thank you. That did the trick. Hey, why don't you write that behind it? :-)

I have to defend MQ.


It says so :-)



 

@ Christian:

I don't mean which file types can be attached to a post/contribution. The "Search" function includes which file types are searched for. I mean the function when I post a freelancer job. I can attach a lot of text and sample files. I've done that too. If you then look for a programmer, you have to explicitly give them the specifications (in addition to the price and implementation time) as an offer. At this point, I had no indication of which file types are required/allowed. Sure, if you want you can say the same as in a forum post, but I didn't find it quite so obvious. I then read through the notes on the specifications, see above, and even there it didn't say which file types are permitted for specifications.

But that's no longer important. I now have the right information and have been able to send everything to the programmer. If he programmes well now, I'll be happy.