Questions from a "dummy" - page 229

 
Rosh:

The #property tester_file property is intended precisely to avoid putting anything anywhere by hand .

tester_file

string

File name for the tester, specifying its extension and enclosed in double quotes (as a constant string). The specified file will be passed to the tester for work. Input files for testing, if needed, should always be specified


If some datafile .csv file is required for the program operation, and it is located in terminal_directory\MQL5\Files, the file will be automatically moved by the tester totesting_agent_directory\MQL5\Files (this is what #property tester_file datafile.csv must be specified for).

The same applies when a test file is located in the common terminal folder?

If I add line:

#property tester_file "Test.txt"

...I get an error like this:


//---

I want to transfer file to the cloud from terminal shared folder. How do I do that?

 
tol64:

Does the same apply when the test file is in the terminal's shared folder?

If I add the line:

...I get an error like this:


//---

I want to transfer file to the cloud from terminal shared folder. How do I do that?

I think this has already been discussed and found out that for the time being, files cannot be transferred to the cloud.
 
lazarev-d-m:


I think this has already been discussed and found out that, for the time being, files cannot be transferred to the cloud.

Need a link to a discussion on this issue then. Where has this been discussed?

I myself am relying on some past discussions and the article: MQL5 Cloud Network speeds up calculations, but something does not work.

You press the "Start" button and the optimization process is started. The terminal prepares the task for tester agents, which includes:

  • I have a compiled file of my Expert Advisor as EX5;
  • indicators and EX5 libraries connected by directives #property tester_indicator and #property tester_library (DLLs are definitely prohibited in the cloud)
  • data files required for testing, which are connected using the #property tester_file directive;
  • testing/optimization conditions (security name, testing interval, simulation mode, etc.)
  • trading environment (symbol properties, trading conditions, etc.)
  • a set of Expert Advisor parameters, which form all necessary passes - tasks.

The MetaTrader 5 terminal communicates with nodes of the MQL5 Cloud Network and gives each node a separate batch of tasks for execution of specific passes. Each node is actually a proxy, as it receives a task and a packet of tasks (single passes), and then starts to distribute these tasks to the agents connected to it. In this case, the Expert Advisor, indicator, library and data files themselves are not saved on the hard drives of MQL5 Cloud Network servers.

//---

I have moved the optimization file to the local folder of the terminal for now. The above error does not occur in this case. Testing in all modes and optimization is running normally, but when trying to enable optimization in the cloud, the log fills with messages like these:

//---

And occasionally zero optimization results come up. Pretty long wait (about ten minutes), but nothing happens.

//---

Finally found out that for many characters optimization in the cloud is "not available" (EA is multi-currency). I've tried to change symbol list manually and it turned out that if I add these symbols, optimization doesn't start (from 2010 to current day):

NZDUSD,GBPUSD,EURJPY,EURGBP

As soon as I've removed them from the list, everything starts working. But I rejoiced too early. As soon as I increase the amount of history I again see the same situation (no results). My Expert Advisor is using so much memory:

//---

Where to look, what to do?

 
tol64:

Need a link to a discussion on this issue then. Where has this been discussed?

I myself am relying on some past discussions and the article: MQL5 Cloud Network speeds up calculations, but something does not work.

//---

I have moved the optimization file to the local folder of the terminal for now. The above error does not occur in this case. Testing in all modes and optimization runs fine, but when I try to enable optimization in the cloud, the log fills with messages like these:

//---

And occasionally zero optimization results come up. Pretty long wait (about ten minutes), but nothing happens.

//---

Finally found out that for many characters the optimization in the cloud is "not available" (EA is multi-currency). I've tried to change symbol list manually and it turned out that if I add these symbols, optimization doesn't start (from 2010 to current day):

NZDUSD,GBPUSD,EURJPY,EURGBP

As soon as I've removed them from the list, everything starts working. But I rejoiced too early. As soon as I increase the amount of history I again see the same situation (zero results). Expert Advisor uses so much memory:

//---

Where to look, what to do?

Do I understand correctly that you manage to somehow send the terminal file and folders to other computers for use in the EA's work?
 
lazarev-d-m:
Do I understand correctly that you manage to somehow send the terminal file and folders to other computers for use in the EA's work?
Yes, if the file is not in the terminal's shared folder, it can be used in the cloud.
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Состояние клиентского терминала - Документация по MQL5
 
tol64:

... Testing in all modes and optimisation runs fine, but when trying to enable optimisation in the cloud, the log fills up with messages like this:

...

A history send error flashed in the log: history send error

There's something wrong with the history. What should I do in this case? I want to optimise parameters from year 2000 by multiple characters.

 
lazarev-d-m:

Take the variable declaration behind the OnInit function and assign a bool value - everything worked for me in the tester and in debugging at once

Do you often give such "useful" advice in this section? And if I were a beginner, he would look for a problem half a year after this advice :)

The booltype is intended for storing logical values true or false, which numerically represent 1 or 0 respectively.

It means that you deliberately make a variable either 0 or 1 and then compare it to a negative number and conclude that everything works.

The question is why this code refuses to work in the tester:

int OnInit()
  {
int cl_ctx;
if((cl_ctx=CLContextCreate(CL_USE_ANY))==-1)
  {
    Print("OpenCL not found! Err: ", GetLastError());
    return(-1);
  }
Print("Ok!!!");
return(0);
  }

void OnTick() {} 
 
MigVRN: Why this code does not work in the tester:

What kind of error does it return?

I don't know anything about OpenCL, but I've seen a thread about OpenCL and the tester before. Perhaps the tester simply does not support this feature? Take a look at the topic OpenCL: internal implementation tests in MQL5

 
Yedelkin:
What kind of error is returned?

In this variant - 0 :)

OpenCL not found! Err: 0
 
Yedelkin:

I don't know about OpenCL, but somehow I came across a thread about OpenCL and a tester. Maybe the tester just does not support this feature? Look at the topic OpenCL: internal implementation tests in MQL5

This is where they say it works.
Reason: