MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Automated Trading, Strategy Testing and Optimization Articles

Accurate TSAccurate TS Try product
Accurate TS
Author: saibabashirdi
XCCI Indicator
XCCI
Author: GODZILLA
Subscribe to signal
Amahmood
71.46%, 71 970.93 USD
Screenshot
EURUSD, H1
Real
How to Buy a Trading Robot on MQL5 Market? How to Buy a Trading Robot on MQL5 Market?
To post a new article, please log in or register

How to Order a Trading Robot in MQL5 and MQL4 [ru]

MetaQuotes | 14 July, 2010 | Views: 4956

 

Automated trading in MetaTrader

The main advantage of the MetaTrader trading terminal is the ability to create automated trading systems, which can perform trading operations, without the intervention of the trader, thus eliminating the influence of psychology on the results of the trade. To do this, we need to formulate a trading strategy and implement it in the form of a program in the MQL language. In addition, aside from the standard technical indicators of the market, you can create your own indicators and visualize them in the trading terminal.

 

Writing trading programs

However, not all traders are programmers, so on forums we often see posts such as "Programmer needed". Many programmers provide such services as writing Expert Advisors and indicators in the MQL language. Work consisting of writing trading Expert Advisors has a certain specificity, the algorithm must be clearly formalized (see article An Expert Advisor Made to Order. Manual for a Trader), otherwise the customer might receive not what expected, so there might be a misunderstandings.

An each side of the contract (the customer and the programmer who implements a solution) would wish to reduce these unpleasant factors. The programmer would like to be sure that the task will be clearly formulated, accepted, and paid for on time. The customer needs the job to be done within the required time period and in the specified volume. As we know, the best advertisement is the recommendations - a lists of qualified programmers (in Russian) is periodically discussed at the Forum. We tried to implement all of this in one place.

 

Jobs section at MQL5.com

The main difference between the "Jobs" service at MQL5.community and the majority of similar resources and services on other websites, is the security. The customer and the programmer are secured from each others' negligent actions throughout the whole period of joint work. In the event of a dispute, the MetaQuotes Software Corp. is ready to assume the role of the Arbitrator.

Even if as a customer, you have already found a programmer who is willing to take on this task, we recommend you to use the new service because it provides many details, which are often overlooked in the preliminary discussions. And vice versa, if you're a programmer, you receive a proposal for writing an automated trading system, indicator, etc. for a specified amount of money. In order to maximally formalize your relationship with the customer, and to conduct the project in a single, common standard, you can offer the second side to transfer their agreement into the form of a new order into the Jobs section.

In this article we will discuss how to use the "Jobs" service for placing and performing a task.

 

1. Creating a New Job

So, we need to place an order for the creation of an Expert Adviser, go to the "Jobs" section and select the "New" item:

Figure 1. Creating a New Job

Figure 1. Creating a New Job

After this you will be able to specify the details of the task:

Figure 2. Editing the task

Figure 2. Editing the task

  • The Name (brief information about the task which needs to be completed)
  • Estimated cost (specified in U.S. Dollars)
  • Tentative time-frame (specified in days)
  • Categories (specify one or two categories of the task): Indicators, Experts, Libraries, Scripts, Integration, Other)
  • Description (information about the task, at this stage it is not necessary to provide a detailed requirement specification)

As in any business, you must be a realist. If you specify too small of a compensation, you risk not getting any proposals for the task implementation, or getting a proposal of a low quality. If you still cannot decide on the complexity, and hence on the cost of the task, yet can postpone specifying it.

In the "Categories" section, you need to specify one or two (no more than that) categories of the task, which need to be completed, and click "Apply":

Figure 3. Jobs Categories

Figure 3. Job categories

In our case, you need to write an Expert Advisor, so choose the category "Expert Advisor".

After this, in the "New" section, you will see an order for the performance of the task, and this order will be displayed in the "Jobs" section for all MQL5 users:

Figure 4. Placing a task order

Figure 4. Placing a task order

The first step has been taken, now we simply have to wait for someone to take the order, and prepare for the questions related to it.

 

2. Processing the orders for executing this job

To inform the customer about the willingness to perform the job, Applicants need to apply for its implementation:

Figure 5. Placing an order for implementing the task

Figure 5. Taking part in the job

The current orders for the task implementation are seen by all users of the MQL5.community. When the orders are submitted by the Applicants, they fall into the category of "Unprocessed".

If you are ready to take on the order, then in your application you can specify additional information, which characterizes you as a developer. This could be your Articles, published scripts in Code Base, links to job portfolios, and so on. This will help the Customer to obtain a better understanding about you, and therefore, make a decision in your favor.

Important: Keep in mind that in your application, only the first message will be available for public view, the rest of the communication between the Customer and the Applicant will be kept private and accessible only to the two of them.

If there are some new messages in the Job, a bag icon will appear, that notifies updates in the jobs:

Figure 6. Updates in jobs

Figure 6. Updates in jobs

Click on the bag icon to see new messages.

Further actions of the Customer is the processing of applications for job implementation. This is done by moving the applications into the categories "Selected", "Candidates", or "Rejected":

Figure 7. The list of applications from Candidates for taking part in the job

Figure 7. The list of applications from Candidates for taking part in the job

The suitable Applicants for the job can be placed into the "Candidates" group, and further discussions about the job's details can be held with them.

When Applicants are placed into the "Candidates" group, they are informed about this, and the following message is placed into the respective Orders:

Important: Try to communicate to each other as much as possible through the commentaries of the Order, not only at this step, but during all subsequent stages. Often, people interpret the same exact terms in different ways, and the more questions you ask each other during the processing of the Order, the better quality of the results you will obtain.

Once the Customer decides on the most appropriate Applicant for the execution of the job, the application needs to be moved to the "Selected" category:

Figure 8. Selecting the Contractor for the job

Figure 8. Selecting the Contractor for the job

Important: During an attempt to select another Order for the current Order, in addition to the one already selected, the currently selected order will be removed from the Selected category.

In this example, the Customer Alexander_Demidov placed the orders of the users Mikhail_Antonov and Greg_Maltsev into the "candidates" group. The order of the user Mikhail_Antonov will be moved to the "Selected" category. The transfer of the Order to the "Selected" category indicates that the Customer has chosen the Contractor of the task.

It is important to note once again, that the "Selected" category can contain an Order from only one Applicant. Try to clarify all questions about the proposed job by this point, it is desirable to re-read all of the messages sent to each other, before proceeding to the next step.

 

3. Executing the Job

The process of executing the job consists of six steps. Passing the first five steps are confirmed by the Customer and the Contractor.

The last step - paying for the completed jobs - is done automatically.

A brief description of the actions of the Customer and the Contractor on each of the steps is provided in Table 1.

Step Name Customer's Actions Contractor's Actions
1 Work Agreement Confirms the selection of the Contractor for implementing the job. Confirms the agreement for the implementation of the job.
2 Requirements Negotiation Provides the Contractor with the Technical Specifications.
Confirms the final price and the job implementation time.
Confirms the agreed with the final Technical Specifications, price, and the job implementation time.
3 Prototype/Model The Customer acquaints himself with the submitted materials. If it is necessary to make changes or alterations, the Customer makes comments on the presented model, indicating the reasons for changes and offering his own version of the changed model.

After obtaining the required prototype/model, the Customer accepts the proposed prototype/model.
The Contractor provides the prototype/model of the job, and confirms the provision of the materials.

At the request of the Customer, the Contractor makes changes to the prototype/model.
4 Demonstration Upon receiving the working materials, the Customer must either confirm that the submitted materials correspond to the nature of the Order, or refuse it, with a provided list of unimplemented technical specifications. When all of the parameters of the Technical Specification have been implemented, the Contractor provides a demonstration of the job, and confirms that the Customer is presented with a completed solution.
5 Work Acceptance The Customer verifies the submitted materials and accepts the job. The Contractor provides the job to the Customer, and confirms that the job has been submitted.
6
Payment After the acceptance of the job by the Customer, the system will automatically transfer the payment from the account of the Customer to the Contractor's account.

Table 1. The actions of the Customer and the Contractor for each of the steps

The discussion of details and material exchange is produced in the messages of a particular task.

Attention! Do not forget to leave all important messages in the form of commentaries, even if you have already discussed these issues through other channels of communication, such as chat, personal messages, or oral discourse. Always secure all of the agreements you have reached in the form of messages, posted directly in the commentaries.

 

3.1 Step 1: Work Agreement

To confirm the start of working with a specific Contractor, the Customer needs to move the selected Order for the job implementation into the "Selected" category, and verify his agreement to the author of the Order:

Figure 9. Confirming Contractor selection

Figure 9. Confirming Contractor selection

After this, in the discussion you will see a confirmation of the step, "Work agreement":

Figure 10. Confirmation of the "Work Agreement" step by the Customer

Figure 10. Confirmation of the "Work Agreement" step by the Customer

After the Customer's confirmation of "Work Agreement", the Developer will receive the following Push notification:

Jobs: Customer Alexander_Demidov confirmed step "Work Agreement".

To be able to receive Push notifications, you need to specify Metaquotes ID in your MQL5.community profile. Read more about Push notifications in the MetaQuotes ID in MetaTrader Mobile Terminal article.

Both Customer and Contractor will be informed with such Push notifications after passing each step.

The Contractor must also confirm his agreement for the implementation of the job:

Figure 11. Confirmation of the "Work Agreement" step by the Contractor

Figure 11. Confirmation of the "Work Agreement" step by the Contractor

After the agreement of the Contractor to implement the job, the working agreement is completed:

Figure 12. The "Work Agreement" step confirmed by both parties

Figure 12. The "Work Agreement" step confirmed by both parties

As seen in Figure 11, step "Work agreement" is now displayed by a light green color. This indicated that the step has been completed.

The Customer and the Contractor may continue to negotiate and discuss the details of the technical specification, the final cost, and the tentative time of implementation.

Note that the Customer should proceed to the next step only after the final version of the Technical Specifications have been approved.

 

3.2 Step 2. Negotiation of Requirements

The Negotiation of Requirements is an important step for further cooperation. Discuss all the nuances of the future solution, ask questions, even if the answers to them seem obvious. After all, the main problem is the lack of understanding, when one party assumed some things to be obvious and present by default, the other party may not see it that way, and therefor certain factors may not be considered equally important by both parties, and thus not handled appropriately.

Figure 13. The requirements to the Expert Advisor

Figure 13. The requirements to the Expert Advisor

When you discuss the Requirements, you can also attach it in your comments as files with allowed extensions.

Figure 14. Attaching the Requirements while discussing the job

Figure 14. Attaching the Requirements while discussing the job

You need to establish a clear understanding of each item in the Technical Specifications. Don't forget to indicate in what form the provided prototypes, demonstrations, and transfers of implemented jobs will be produced.

Before confirming step 2, the Customer should provide a final list of Requirements as an attachment. All the requirements must be specified. If necessary, the requirements can be presented using the images.

The Customer must provide the final version of the Technical Specification, establish the amount of the payment, and the terms and deadlines of job implementation.

Figure 15. Confirmation of technical Specifications by the Customer and approving the final cost of the job

Figure 15. Confirmation of technical Specifications by the Customer and approving the final cost of the job

The Contractor must agree to the terms of the technical Specifications and the final cost of the job:

Figure 16. Confirmation of agreement with the Technical Specifications by the Contractor and approving the final cost of the job

Figure 16. Confirmation of agreement with the Technical Specifications by the Contractor and approving the final cost of the job

Confirmation by both parties of the Technical Specifications must contain all requirements of the Order.

The confirmation at the given step indicated that all jobs will be produced in full compliance with the final version of the Technical Specifications. No other preliminary agreements, written or oral, not described in the Technical Specifications, can be taken into account when evaluating an issue or complaint.

After confirmation by both parties of the step "Negotiation of Requirements", you will see the following message in the discussions:

Figure 17. Confirming the "Negotiation of Requirements" step

Figure 17. Confirming the "Negotiation of Requirements" step

After the completion of the step "Negotiation of Requirements" it is impossible to make any changes to the commentaries of job discussions. In case it is necessary to make some changes, you need to send a new message, with a detailed description of the necessary alteration.

 

3.3 Step 3. Prototype/Model

The first step in implementing the Order is to agree on the prototype or model of the Order. At this stage, the following things can be specified: the elements of the interface, the order and the names of input parameters, the external appearance of the indicator, and the type of outbound messages, etc. Usually, this type of model allows you to gain an understanding about the required functioning and external view of the future program.

If the main purpose of the Order is to create an information system, which helps the trader to analyze the current market situation, then the model can be represented as a design of the future system, including the order of every management element in it. For an Expert Advisor, the model can be a flowchart, which demonstrates the process of decision making in the future trading robot. Basically, at this stage we need to decide upon the selected direction, and subsequently follow it.

The harmonization of the prototype/model is an important step in mutual understanding between the Customer and the Contractor in the work process. Try to find admissible solutions, which will not hinder the execution process of the Order.

The Contractor provides the Customer with the prototype/model of the future programming product. If the Customer has no comments on the materials, provided by the Contractor, then the Customer must grant his confirmation in order to move to the next step.

If some vital part in the prototype/model does not meet the requirements, described in the Technical Specifications, then the prototype can be sent for a revision, with an indicated reason of the revision, and a proposal for eliminating the comment. It is important to understand that some seemingly minor requests, changes, or refinements of the Order, can in practice lead to major changes in the code, a significant increase of the time of development, and the cost of the future solution. Therefore, always try to find a compromise, which suits both, the Customer and the Contractor.

After the Customer's confirmation of the prototype / model, the main discussions will be limited to the logic of the program, and in comments, you will see the following message:

Figure 18. Confirming the "Prototype/Model" step

Figure 18. Confirming the "Prototype/Model" step

If in the course of working with this Order, there was a deviation from the requirements of the Technical Specifications, then the Customer can turn to the Arbitrator for help in solving the problem.

 

3.4 Step 4. Demonstration

After agreeing on a prototype of the program, the Contractor proceeds to the final implementation of the order. During the process of the job's implementation, it is desirable that the Contractor continues to clarify the arising issues in the commentaries.

Once all of the requirements, specified in the Technical Specifications, have been implemented, it is time to demonstrate the finished job to the Customer. The job must meet the formal requirements of the Technical Specifications and the prototype/model must be approved by the Customer. Additional comments, which arise over the course of the job, may be rejected by the Contractor, if they were not discussed over the preliminary stages.

The type of format the demonstration will be produced in - depends on the nature of the Order. For Expert Advisors this can be the provision of test reports for a pre-specified period. This may also require the provision of additional logs about the work of the Expert Advisor, on a specific demo account of a specific broker, etc. This can be an attached video, or even a video conference, or a provision of a remote access to the Contractor's terminal, on which the finished program can be executed.

All of the demonstration stages should also be reflected in the commentaries to the Order, where the Customer can ask questions, with attached screenshots, and the Contractor can respond to them. The purpose of the demonstration and its discussion is to ensure the Customer that the Ordered job has been done properly, and in the volume, which has been agreed upon.

After the demonstration has been produced, the Customer must either confirm that the submitted materials satisfy the nature of the Order, or refuse it, providing a list of unimplemented requirements of the Technical Specifications. If necessary, the Executive takes a little time to correct the identified deficiencies, and produces a new demonstration.

The process of validation of the step "Demonstration" is also automatically recorded by the Jobs service:

Figure 19. Confirming the "Demonstration" step

Figure 19. Confirming the "Demonstration" step

If in the course of working on an Order, there is a deviation from the requirements of the Technical Specifications, then the Customer or the Contractor may appeal to the Arbitrator in order to resolve the situation.

 

3.5 Step 5. Work Acceptance

The Contractor finally passes to the Customer all of the materials on the implemented job, in the specified volume. Typically, the solution is transferred in its source code, since the version of the compiler may change in the future, and this will require recompiling the solution. If for some reason the source codes are not transferred, and only the compiled execution codes is available, then the issue of future updates should be addressed as early as at the stage of Technical Specifications preparation. Issues, related to solution's updates, are not handles by the administration of the Jobs resources, and can not be presented for appeal to the arbitrage.

The questions of further usage of the obtained results in other developments, by the Customer or the Contractor, as well as the authorization of passing the solutions to third parties on paid or free bases, should also be addressed in the Technical Specifications, and also can not be raised before the arbitrage after the transfer is complete. The administration of the Jobs section does not have the ability to track down the execution of such requests, and the optimum guarantee for both parties in such cases is their personal reputation.

The fact of the transfer of implemented jobs must be reflected in the commentaries, where you should describe in details the way that the transfer has been implemented. If the job is transferred via email, then the Contractor should indicate this in the commentaries and specify when and to what mailbox was the job sent to. The Customer, in turn, confirms the receivership of such letter, and indicates the time it was received. Even if the transfer is implemented right in the commentaries to the Order, it should still be mentioned in it that commentary that the Contractor is transferring the final solution, in full accordance to the Technical Specifications.

After the materials have been transferred, the Contractor waits for the confirmation of receivership by the Customer. If within three days, the Customer does not write any commentaries to the Order about any issues arising with the job, or doesn't engage in any type of communication, three days after the Contractor confirms the transfer, then the job is considered accepted automatically.

Figure 20. Confirming the "Work Agreement" step

Figure 20. Confirming the "Work Agreement" step

If in the course of working on an Order, there is a deviation from the requirements of the Technical Specifications, then the Customer or the Contractor may appeal to the Arbitrator in order to resolve the situation.

 

3.6 Step 6. Payment

After the step "Work Acceptance" has been done, the job is considered completed, and the payment for it will automatically be transfered from the Customer's account to the Contractor's account. No actions from the Customer are required to implement the payment

Figure 21. Job payment

Figure 21. Job payment

After its completion, the job is transferred to the "Completed" section

Figure 22. Job is complete

Figure 22. Job is complete

 

4. Feedback about the job

After the completion of the job, the Customer and the Contractor have the opportunity to write a feedback about the working cooperation and assign it a quality rank.

The list of jobs, completed by the Customer or the Contractor, can be found in the "Jobs" section of the user's profile.

An example of feedback, posted by Customer is presented at figure 20.

Figure 23. The list of jobs completed by Mikhail Antonov

Figure 23. The list of jobs completed by Mikhail Antonov

The Contractor also can post his feedback about the finished job:

Figure 24. Feedback from the job Contractors hired by Alexander Demidov

Figure 24. Feedback from the job Contractors hired by Alexander Demidov

 

Conclusion

If you are a trader with a ready-made trading strategy, but do not know how to program in MQL5/MQL4, then the "Jobs" service is perfect for you. With this service you will obtain a simple, controllable, and safe opportunity to find the right developer who will write an Expert Advisor or an indicator for you. Any registered user can accept your offer and develop the desired program for you.

With the launch of the "Jobs" service, the MQL5.community became an ideal place for placing orders and providing programming services. Thousands of traders and developers visit this resource on a daily basis, and can easily help each other. For a trader, the "Jobs" service is the opportunity to easily obtain his own Expert Advisor. For an MQL5-developer, it is an opportunity to easily find a client.

Translated from Russian by MetaQuotes Software Corp.
Original article: http://www.mql5.com/ru/articles/117

Last comments | Go to discussion (8)
Muthukrishnan Sellemuthu
9446180668 | 15 Feb 2012 at 06:31

Hello I am new to mt5.com .I have ordered an EA from jobs section and while going through the step by step process of the work i have face difficulties  in the 'Negotiation of requirements' step. Both of us, me and the developer confirms the step but I can not access the next step Prototype/Model . The column Negotiation of requirements is still in green color  and i am not able to go the next section . Anyone there experienced Please help me...
Paulo Oliveira
PauloBrasil | 23 Apr 2012 at 15:28
9446180668:

Hello I am new to mt5.com .I have ordered an EA from jobs section and while going through the step by step process of the work i have face difficulties  in the 'Negotiation of requirements' step. Both of us, me and the developer confirms the step but I can not access the next step Prototype/Model . The column Negotiation of requirements is still in green color  and i am not able to go the next section . Anyone there experienced Please help me...

I'M HAVING THE SAME PROBLEM,  SEE  IMAGES ATTACHED

You have idea of what is happening, how we could resolve this situation?

MetaQuotes
MetaQuotes | 6 Feb 2013 at 09:47

Now all messages from the Jobs service (completed steps, appeals to arbitration, etc.) are sent only via Push notifications. It was decided to renounce communications via SMS.

Please bear this in mind and inform your potential customers/developers.

You can read about Push messages in details in the MetaQuotes ID in MetaTrader Mobile Terminal article.

Salvatore Amato
gepi1956 | 26 Mar 2013 at 10:37
MetaQuotes:

Ora tutti i messaggi dal servizio Lavoro (passaggi completati, ricorsi ad arbitrato, ecc) vengono inviati solo tramite notifiche push. Si è deciso di rinunciare alla comunicazione via SMS.

Si prega di tenere questo in mente e informare i vostri potenziali clienti / sviluppatori.

È possibile leggere i messaggi push in dettaglio nel ID MetaQuotes in MetaTrader Mobile Terminal articolo.

Hello I'm new

I have selected a candidate. I have sent him the project in the details. how much middle time does it have available for giving me an answer? 

thanks

Alain Verleyen
angevoyageur | 26 Mar 2013 at 11:14
gepi1956:

Hello I'm new

I have selected a candidate. I have sent him the project in the details. how much middle time does it have available for giving me an answer? 

thanks

I don't know if there is a rules for this. May be this would help you.
Writing an Expert Advisor Using the MQL5 Object-Oriented Programming Approach Writing an Expert Advisor Using the MQL5 Object-Oriented Programming Approach

This article focuses on the object oriented approach to doing what we did in the article "Step-By-Step Guide to writing an Expert Advisor in MQL5 for Beginners" - creating a simple Expert Advisor. Most people think this is difficult, but I want to assure you that by the time you finish reading this article, you will be able to write your own Expert Advisor which is object oriented based.

The Principles of Economic Calculation of Indicators The Principles of Economic Calculation of Indicators

Calls to user and technical indicators takes up very little space in the program code of automated trading systems. Often it’s simply a few code lines. But it often happens that it is these few lines of code which use up the largest portion of time, which needs to be spent on testing the Expert Advisor. Therefore, everything that is related to data calculations within an indicator, needs to be considered much more thoroughly than would seem at first glance. This article will talk precisely about this.