Expert Advisors are tested and optimized using the so called agents, which are separate services on a computer for performing calculations. The agents can be local and remote.
Local agents are created automatically on the computer where the trading platform is installed. The number of local agents is equal to the number of logical cores.
A remote agent is a specialized service installed on a computer and used for testing and optimizing Expert Advisors in the strategy tester. The unlimited number of such agents can be connected to a platform. Use of remote agents considerably speeds up optimization of strategies, because each run is performed as a separate process on a separate agent. The process of remote agent connection to a strategy tester is described in a separate section.
|
Remote agents are installed as separate services in the operating system using the special application "metatester.exe" located in the trading platform installation folder.
To save traffic and disk space, as well as for security reasons:
|
To store the service information, MetaTester creates the "Tester" folder in the directory where the application is located. It contains the following folders and files:
Folders and Files |
Description |
Sub-folders |
Description |
---|---|---|---|
Agent-IP-address-port |
The folders are created for each agent of the tester. The folder name contains the IP address and port number the agent runs on. |
logs |
The agent operation logs are stored in this folder. |
bases |
History data used by the agent are stored in this folder. |
||
Manager |
This directory contains MetaTester component logs. |
Log files of agents are automatically deleted two days or if their size exceeds 1 gigabyte. |
In order to share the calculation powers of your computer with a trading platform over a local network or Internet, install remote agents. Agents can be installed and managed using the special utility MetaTester. It is available in the default standard trading platform package. Run metatester.exe from the platform installation folder.
|
The window of the MetaTester application consists of several tabs:
This tab displays helpful information about the use of agents. It also displays statistics on the number of tests performed using the agents and the time spent on them. The statistical data are available for two agent operation modes:
On this tab you can manage agents on your computer. To install testing agents specify the following:
To install the agents click Add. Agents are installed at the IP address specified at the top of the tab. Use this address to connect to the agents.
To install and manage agents, a user needs administrator permissions on the system. |
The list of installed agents is displayed at the bottom of the window:
Installed agents can be managed using the context menu commands:
When you close the MetaTester window, running agents are not stopped. To stop an agent, execute the appropriate command in its context menu. |
The MQL5 Cloud Network is a special system designed to integrate remote agents into a single cloud network. Its key advantages are:
The tab contains an option for managing use in the distributed computing MQL5 Cloud Network: Sell computing resources via an MQL5.community account.
By enabling this option, a user consents to allow use of his or her remote agents via the MQL5 Cloud Network. Each agent service will be available in the network in accordance with a preset scale.
When connected to the MQL5 Cloud Network, the agent is still available for normal remote connections using IP address and password.
To provide the computing power of agents as a paid service, specify your MQL5.community account in the appropriate field. Fees for the use of your agents are transferred to the specified account via the internal MQL5.community payment system.
If you do not have an account, you may create one by clicking "Register a new MQL5.community account..."
|
On this tab you can set a schedule for managing the availability of your remote agents in the MQL5 Cloud Network.
The hours when the agents are available are colored blue, the unavailable hours are light-colored. To switch between working and non-working hours click on the appropriate square. To mark all hours of a certain day, click on the asterisk at the end of a row.
This schedule does not influence the availability of agents for a normal remote connection using IP address and password. |
To work with agents through the command line, use the console commands of the metatester.exe file:
To delete an agent using the command line, you can also execute the following commands:
For example, to delete the already stopped agent "MetaTester-1", you should execute the following command:
sc delete "MetaTester-1".