Libraries: MultiTester - page 22

 
I answer my own question: mqh files do not need to be compiled separately. And you started looking too, didn't you? It's working. Thank you.
 

When you look through the results of Optimisation, you may like some single passages and want to quickly get some useful information about them to use it later.

I found this method very convenient for me.

#define private public
  #include <fxsaber\MultiTester\MTTester.mqh>
#undef private

void OnDeinit( const int Reason )
{
  if (!MQLInfoInteger(MQL_OPTIMIZATION) && MQLInfoInteger(MQL_TESTER))
  {
    const datetime EndTime = TimeCurrent() - TimeCurrent() % (24 * 3600) + 24 * 3600;
        
    const string Str =          TimeToString(EndTime, TIME_DATE) + ": " +
                                DoubleToString(TesterStatistics(STAT_PROFIT), 0) + ", " +          
                                DoubleToString(TesterStatistics(STAT_TRADES), 0) + ", " +          
                                DoubleToString(TesterStatistics(STAT_PROFIT_FACTOR), 2) + ", " +          
                                DoubleToString(TesterStatistics(STAT_EXPECTED_PAYOFF), 2) + ", Fit = " +          
                                DoubleToString(TesterStatistics(STAT_CUSTOM_ONTESTER), 2) + "\n";

    MTTESTER::SetClipboard(_Symbol + " " + Str); // Placed the single pass string on the clipboard.
  }

After a single pass, all the necessary information is available in a brief form in the clipboard as a string. I paste it via CTRL+V where it is more convenient now.

Then, when a lot of such interesting strings have been accumulated, I evaluate the overall situation.


You form the string yourself, of course. Above is just an example. The main thing is that it fits into the clipboard.

 

fxsaber, thanks for the multitester! Your publications are as always on top of their game!


Before inventing a bicycle, I would like to ask for advice.

As a result of optimisation of EA parameters by a list of symbols using multitester, I get a list of .opt files and the results of optimisation can be viewed only separately for each symbol.

How can I combine them into an average resultfor all symbols? Let's say I want to get a standard MT5 2D graph of two parameters (of green shaded squares).

Or how is it easier to combine all the results into an Excel table, manual export of all S&P500 results to Excel is not very convenient....

fxsaber
fxsaber
  • www.mql5.com
Предупреждение для тех, кто не знает (почти все). При передаче мастер-пароля (даже на короткое время) от MT4/5-торгового счета другому лицу автоматически происходит передача не только имени, на кого зарегистрирован торговый счет (как при передаче инвест-пароля), но и реального email-адреса и номера телефона, на которые зарегистрирован торговый...
 
Sunriser:

As a result of optimisation of EA parameters by the list of symbols using the multitester, a list of .opt files is obtained and the results of optimisation can be viewed only separately for each symbol.

And how to combine them into an average resultfor all symbols? Let's say I want to get a standard MT5 2D graph of two parameters (of green shaded squares).

Or how is it easier to combine all the results into an Excel table, manual export of all S&P500 results to Excel is not very convenient....

It is possible to consolidate all opt-files of multi-optimisation into one via TesterCache.

TesterCache
TesterCache
  • www.mql5.com
MT5-тестер автоматически сохраняет оптимизационные кеши (данные оптимизации) в файлах  Tester\cache\*.opt . И умеет экспортировать/импортировать их. Данная библиотека позволяет работать с этими данными. Сценарии Вывод более полных данных, чем это предоставляет MT5-тестер. Создание критериев оптимизации в любое время после проведенной...
 
Hey, this looks like an amazing tool, I'm trying to use google translate but I just don't get how to work with it. Is there some tutorial on English? I don't get at what point I can activate it and make the list of the symbols to be tested with my expert. Or do I need to edit a code file manually and them import it? Thanks!
 
Thierry Waltrich:
Hey, this looks like an amazing tool, I'm trying to use google translate but I just don't get how to work with it. Is there some tutorial on English? I don't get at what point I can activate it and make the list of the symbols to be tested with my expert. Or do I need to edit a code file manually and them import it? Thanks!

There are people here who are actively using this tool (or based on it). It would be great if they could help you understand it.

Unfortunately, I have shared so much of my work with the community that not only I cannot find time to constructively answer entry-level questions, but I have almost stopped the practice of posting my developments and results.

 

A convenient way to run forwards when manually analysing the results of Optimizations.

// Run Forward from the Optimisation results table (run in the Terminal).
#include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/ru/code/26132

sinput datetime inForward = D'2020.01.01'; // Forward from

const bool Init = EventSetMillisecondTimer(100);

void OnTimer()
{
  static const string Forward = "[Tester]\r\nFromDate=" + TimeToString(inForward, TIME_DATE) +
                                "\r\n[TesterInputs]\r\ninBestInterval_Action=true";
  static bool Ready = true;
  static bool Flag = false;
  
  static string Settings;
  
  if (Ready)
    Ready = MTTESTER::IsReady();
  else if (MTTESTER::IsReady())
    Ready = (Flag = !Flag) ? !(MTTESTER::GetSettings(Settings) && MTTESTER::SetSettings2(Forward) && MTTESTER::ClickStart(false))
                           : MTTESTER::SetSettings2(Settings);
}

I open the Optimisation table of any Expert Advisor and click "Run single test" on the passages of interest. I get the output forward of the pass.

It saves a lot of time (for me, a pass lasts a couple of seconds), especially with BestInterval.

 
Thierry Waltrich:
Hey, this looks like an amazing tool, I'm trying to use google translate but I just don't get how to work with it. Is there some tutorial on English? I don't get at what point I can activate it and make the list of the symbols to be tested with my expert. Or do I need to edit a code file manually and them import it? Thanks!

You need to select the Expert you want to optimise in the strategy tester and set the parameters to be optimised.

Then compile Example1 and drag and drop it on any Chart (run), it will start running your Expert Advisor on those Charts and Time Frames that are set in the code of Example 1.

So you need a MultitesterExpert that as an automaton runs your optimised Expert on different _Symbol / _Period etc..

By studying the comments in Example 1 and Example 2 you will be able to make your own MultitesterExpert based on them.

 

GetSettings(Str) breaks testing on local agents.

GetSettings(Str) I used to find out what type of tick modelling is used in the test.

Example:

I added the following to the Moving Average Expert Advisor example code:

#include <fxsaber\MultiTester\MTTester.mqh>

int OnInit()
  {

// Expert Advisor's standard code

//get tester settings
   string  Str;
   if(MQLInfoInteger(MQL_TESTER) && MTTESTER::GetSettings(Str))
     {
      Print(Str);
     }
   return(INIT_SUCCEEDED);
  }

I run optimisation with full enumeration of parameters, as a result the tester tends to switch from any tab to the "Settings" tab.

A disproportionate number of buildings are distributed to local agents and they are not executed.


Can you suggest something on your own?

 
Sunriser:

Can you give me a hint?

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

On local Agents this sinput variable will tell you what the mode is.


The mode can be determined by real ticks without DLL.