Libraries: MultiTester - page 29

 
pcdeni #:

so, no.

 
Manage LiveUpdate of the terminal.
// Switching the terminal LiveUpdate state.

#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/ru/code/26132

void OnStart()
{
  const bool IsLiveUpdate = MTTESTER::IsTerminalLiveUpdate();
                     
  if (MessageBox("Current LiveUpdate - " + (IsLiveUpdate ? "ON" : "OFF") + ".\n\nWant to switch?",
                 "LiveUpdate Status", MB_YESNO) == IDYES)
   MessageBox("Current LiveUpdate - " + ((IsLiveUpdate ? !MTTESTER::TerminalLiveUpdateOFF() : MTTESTER::TerminalLiveUpdateON()) ? "ON." : "OFF."));
}
 
fxsaber #:
Terminal LiveUpdate management.
Thank you!
 
Enable/disable writing logs during Optimisation to disk.
// // Enable/disable tester logs (Optimisation).
#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/ru/code/26132

#define  INPUT_TESTER_LOG inTesterLog
#define  TOSTRING(A) #A

sinput bool INPUT_TESTER_LOG = true; // Enable/disable tester logs

void OnTesterInit()
{
  string Settings;
  
  if (MTTESTER::GetSettings(Settings))  
    MessageBox("TesterLog - " + (((MTTESTER::GetValue(Settings, TOSTRING(INPUT_TESTER_LOG)) == "true")
                                   ? MTTESTER::TesterLogON(true)
                                   : !MTTESTER::TesterLogOFF(true)) ? "ON." : "OFF."));
  
  ChartClose();
}

void OnTesterDeinit() {}

input int inRange = 0;


Enable.


Switch off (speed up Optimisation).


S

Forum on trading, automated trading systems and testing of trading strategies

Errors, bugs, questions

fxsaber, 2022.09.04 17:55

#property script_show_inputs

#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/ru/code/26132

sinput bool inTesterLog = true; // Enable/disable tester logs

void OnStart()
{
  MessageBox("TesterLog - " + ((inTesterLog ? MTTESTER::TesterLogON(true) : !MTTESTER::TesterLogOFF(true)) ? "ON." : "OFF."));
}
 
Added to MTTester.mqh a workaround for possible conflicts when working with parallel Testers.
Несколько MT5-тестеров параллельно на одной машине.
Несколько MT5-тестеров параллельно на одной машине.
  • www.mql5.com
Автоматизация MT5-Тестера потребовала параллельного использования нескольких Тестеров на одной машине: оптимизация ( MultiTester ) и одиночные проходы ( Validate и TesterDashboard ). Необходимость
 

fxsaber #:
В MTTester.mqh добавлен обход возможных конфликтов при работе с параллельными Тестерами.

Note the highlighted address of each agent in the screenshot: 127.0.0.1:30xx. They do not overlap. That is, each CPU core is occupied by its own agent. MT5 allocates agents in the correct way.

Question on the blog phrase. I'm not sure that automatically allocating processes by port number ensures that they are spread across different cores without potential overlap. How many cores are there in the above screenshot? And for example, what happens if you run 2 optimisations in parallel?

 
Stanislav Korotky #:

Question on a phrase from the blog. I'm not sure if automatically partitioning processes by port number ensures that they are spread across different cores without potential overlap. How many cores are there in the above screenshot? And for example, what happens if you run 2 optimisations in parallel?

There are 20 cores on the screenshot: 18 for optimisation on one terminal and one for single passes - another terminal. TaskManager shows that 19 cores out of 20 are fully loaded (5% each). Free ~4%.

I did not practice optimisation in parallel. No need for now.

 
fxsaber #:

There are 20 cores on the screen: 18 for optimisation on one terminal and one for single passes - another terminal. TaskManager shows that 19 cores out of 20 are fully loaded (5% each). Free ~4%.

Thanks. As far as I understand, it is only about "parallelisation" of access to files, and the settings of cores for agents still need to be done manually?

 
Stanislav Korotky #:

Thanks. As far as I understand, it is only about "parallelisation" of file access,

Accessing the system clipboard. It's not about the files.

Do I still have to do the agent kernel settings by hand?

I don't do anything.

 
fxsaber #:

Accessing the system clipboard. Files are not involved.

I'm not doing anything.

I didn't see in the source code changes that something was done with the clipboard.

If you run optimisation, won't it take all available cores at once? I don't understand how a single test "took away" one core from optimisation (in fact, even 2 agents of optimising MT are marked as disabled).