Libraries: MultiTester - page 19

 
Edgar Akhmadeev:

Actually, I'm not talking about the specific MultiTester programme, but about its clicker base, which I took away. I have the clicker set many fields before optimisation, and something has changed there.

Everything can be done without the MTTester.mqh button-methods. The clipboard gives full control.

 
fxsaber:

Everything can be done without MTTester.mqh button-methods. Clipboard gives full control.

Again, thank you very much for the idea. I use the clipboard to set parameters, but the optimisation settings tab didn't even occur to me.

 
Edgar Akhmadeev:

Here again, thank you very much for the idea. I use the clipboard to set parameters, but the optimisation settings tab didn't even occur to me.

MTTESTER::GetSettings
MTTESTER::SetSettings2
 
fxsaber:

A good demonstration of why it is useful to do several GAs in a row.

Here are five GAs.

How do you do multiple GAs in a row? I always have one peak. And the picture is like this:

Opt

 
HimOrik:

How do you do multiple GAs in a row?

Run it several times. Or smoke MTTester.mqh, then everything is easily automated.

 
fxsaber:

Run it several times. Or smoke MTTester.mqh, then everything is easily automated.

Thanks, I'm trying. " Run it several times. " - do you need to set very different sets of input parameters to find different extrema? So far, several passes of GA give similar results.

That's what this is about:

"

fxsaber 2020.03.10 09:09 #164 RU

Please share your experience on how to do GA correctly. I encountered a situation when GA finds only one of the necessary local extrema.

"

Where to dig to get different sets?

fxsaber
fxsaber
  • www.mql5.com
Добавил тему MT5 и скорость в боевом исполнении MT5 - шустрая платформа. Но есть узкие горлышки, которые сводят на нет все старания быстрой торговли. Хотелось бы собрать проблемы здесь, обсудить и решить их где-то своими силами, где-то с помощью Разработчиков Добавил тему Лимитники/тейки по текущей цене в Терминале (не в Тестере) Сабж...
 
HimOrik:

Thanks, I'm trying. " Run it several times. " - do you have to set very different sets of input parameters to find different extrema? So far, several runs of GA give similar results.

That's what this is about:

"

fxsaber 2020.03.10 09:09 #164 RU

Please share your experience on how to do GA correctly. I came across a situation when GA finds only one of the required local extrema.

"

Where to dig to get different sets?

Different sets of local maxima may simply not exist. The local maximum of a set of parameters can be one, and if it is gentle it is better than sharp) Such a TS is more stable than with sharp LokM.

 
HimOrik:

How do you do multiple GAs in a row? I always have one peak. And the picture is like this:

To get multiple passes on one graph, you have to run it several times without changing parameters.
 

When it is necessary to run Optimisation in the mode by all symbols from the Market Watch (the target is a single opt-file) and a certain group of symbols is required, it can be done through an Expert Advisor, running in the Terminal.


This Expert Advisor removes all unnecessary symbols from the Market Watch, and at the end of Optimisation restores the previous list of symbols. This is all obvious.


Another feature of MT5 is interesting. If you want to remove EURUSD from the Market Watch and the EA is running on the EURUSD chart. This is solved by running ChartSetSymbolPeriod to itself, but at the same time (important!) make OnInit return successful.


This method can be used in the Market as well. For example, the Market Expert Advisor works only on AUDJPY. Then the user can allow the Expert Advisor to run on the chart of any symbol/TF. The Expert Advisor itself will change this chart to the desired one.

 
// Terminal protection from closing. Run this Expert Advisor once on a live Terminal.

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

int OnInit()
{
  const bool Res = MQLInfoInteger(MQL_TESTER);
  
  if (!Res)
  {
    string Settings;
    
    while (!IsStopped() && !MTTESTER::GetSettings(Settings))
      ;
  
    if (MTTESTER::IsReady())
    {
      Settings = "[Tester]\nExpert=" + StringSubstr(MQLInfoString(MQL_PROGRAM_PATH),
                                                    StringLen(TerminalInfoString(TERMINAL_DATA_PATH)) + StringLen("\\MQL5\\Experts\\")) + 
                 "\nOptimization=0\nModel=3";
  
      while (!IsStopped())
        if (MTTESTER::SetSettings2(Settings))
        {
          MTTESTER::ClickStart(false);
          
          break;
        }
    }
    
  }
      
  return(!Res);
}

double OnTester()
{
  while (!IsStopped())
    ;
    
  return(0);
}

Tested on b2571.