Libraries: MultiTester - page 23

 
fxsaber:

In OnTesterInit do GetSettings and pass the obtained values from there via ParametersSetRange to sinput variable.

Thanks, it partially helped.

When I moved the GetSettings() call to OnTesterInit(), the tester stopped switching to the settings tab, but something is wrong with local agents.

GetSettings data is not used anywhere, just calling the function.

void OnTesterInit()
  {
   //get tester settings
   string  Str;
   if(MQLInfoInteger(MQL_TESTER) && MTTESTER::GetSettings(Str))
     {
      // Print(Str);
     }
  }
  
 void  OnTesterDeinit()
  {
  }


 
Sunriser:

there's something wrong with the local agents.

GetSettings can be called only on local Agents - the machine where the Terminal is running. You cannot run it on other machines.

That's why OnTesterInit is the only option.

 
Updated.
 

I want to write information about this single test to a file after each single pass.

Where do I insert the record block? In the library? Or is it only implemented in the Expert Advisor?

In the usual case without the library I inserted it in the ondeinit block. I haven't found where to insert it here yet.

Документация по MQL5: Файловые операции / FileWrite
Документация по MQL5: Файловые операции / FileWrite
  • www.mql5.com
FileWrite - Файловые операции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Aleksei Skrypnev:

I want to write information about that single test to a file after each single pass.

Where do I insert the record block? In the library? Or is it only implemented in the Expert Advisor?

In the usual case without the library I inserted it in the ondeinit block. I haven't found where to insert it here yet.

If there is no source code for the Expert Advisor being run: only EX5, then you need to pull information (inside MultiTester) from a single run through the generated tst-file.

If there is a source, then insert a record to the Common file in OnDeinit of the Expert Advisor.

 
fxsaber:

If there is no source code for the Expert Advisor to be run: only EX5, then you need to pull information (inside MultiTester) from a single run through the generated tst-file.

If there is a source, then insert a record to the Common file in OnDeinit of the Expert Advisor.

It sounds clear, but the implementation is not very clear yet. I'll keep poking).

But as far as I understand, simply inserting a block to record information in the right place in the library files will not solve this case so easily? (That is, there is no ready block to save each pass to a file).

 
fxsaber:

If there is no source code for the Expert Advisor to be run: only EX5, then you should pull information (inside MultiTester) from a single run through the generated tst-file.

If there is a source, then insert a record to the Common file in OnDeinit of the Expert Advisor.

By the way, for some reason, I have a record only for the last Expert Advisor. That is, 3 identical scripts are tested one after another and write data to 3 different files, but only the last one writes to its own file.

All right, I duplicated more Expert Advisors, but still the record goes only to the last Expert Advisor. The method of writing to a file using standard filewrite in OnDeinit of each EA.

According to the terminal logs the same thing is opened and written to the last one.
Документация по MQL5: Файловые операции / FileWrite
Документация по MQL5: Файловые операции / FileWrite
  • www.mql5.com
FileWrite - Файловые операции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Aleksei Skrypnev:

But as far as I understand, simply inserting a block of information recording in the right place in the library files will not solve this case so easily? (That is, there is no ready block to save each pass to a file).

I've made combines that after Optimisation pick out the best passes from an opt-file. Then based on them made forwards and created other optimisation jobs.

But this is really something few people can do here.

 
Aleksei Skrypnev:

By the way, for some reason I am recording only the last EA.

I don't get it.

 
fxsaber:

I don't get it.

In the library there is a file MultiTester_Example2.

I took it and added to the existing 4 EAs there 3 more EAs identical just copied from each other.

In the ondeinit of each of its advisor specified a record in the file for example advisor1 makes a record in file1, advisor2 makes a record in file2, advisor3 makes a record in file3.

I throw MultiTester_Example2 on the chart. The line runs - shows the finish. I go to the record folders and see only the recorded file named file3.

(I don't understand the reason yet).

I add for example EA4, run the test and see the output record in the file EA4.- (that is, only file4 and file1, 2, 3, no).

That is, only the last Expert Advisor is written to the last file.

(That is, as if OnDeinit is executed using the library or something 1 time in the very last EA from the list. ). ( And not the end of each EA from the list. )

(Before that I tried to write in 1 file info from each of 3-4 EAs, but the information in the file was also only from the last EA.

Документация по MQL5: Файловые операции / FileWrite
Документация по MQL5: Файловые операции / FileWrite
  • www.mql5.com
FileWrite - Файловые операции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5