Libraries: MultiTester - page 11

 

Sometimes it is necessary to clean the Tester folder. For example, a modest opt-file size is ~ 2Mb. If 10K optimisations are performed, it is already 20 Gb. 10K characters - similarly.

You may encounter a folder that is too bloated.

 

I tried writing these lines into my EA and example as"Moving Average", my purpose is to optimize all my market watch symbols but I've got the following answer, I'd appreciate some help there.


#include <fxsaber\MultiTester\MultiTester.mqh>

and

void SetTesterSettings()


 
herrcrowley:

I tried writing these lines into my EA and example as "Moving Average", my purpose is to optimize all my market watch symbols but I've got the following answer, I'd appreciate some help there.

Set up your EA in the Tester. Then run MultiTester_Example in Terminal.

 

hi again,

thank so much for your advice, now when I test with "customs symbols" on true, multitester do not work and on false only tests the actual symbol to be tested.


 
herrcrowley:

thank so much for your advice, now when I test with "customs symbols" on true, multitester do not work and on false only tests the actual symbol to be tested.

Unfortunately, the language barrier or other obstacle does not allow me to figure out what is wrong.

 

For some unknown reason, multiple test runs unload the script. It doesn't always happen, sometimes earlier, sometimes later. It just happened on iteration 413, for example. IsStopped is set to true and the script unloads, screwing up the whole job in the middle of the case. There are noerror messages. Debug messages showed that it happens after Sleep(100) after SendMessageW(Handle, WM_COMMAND, ID_EDIT_PASTE, 0);

in the call of static bool SetSettings( const string Str )

Below is the minimum set to play with. But I suspect that it's MetaTrader after all. Build 2245, but it is the same on the latest build 2253. Build 2190 also has it, maybe earlier too.

bool CloseAllOtherCharts()
{
  bool Res=false;
  for (long Chart = ::ChartFirst(); Chart != -1; Chart = ::ChartNext(Chart))
  {
    if(Chart != ::ChartID())
      Res |= ::ChartClose(Chart);
  }
  return Res;
}

void StartTest(string SymbName)
{
    string TesterInput = "[Tester]"+
                         "\nExpert=ChanRet"+
                         "\nSymbol="+SymbName+
                         "\nPeriod=M1"+
                         "\nOptimization=0"+
                         "\nModel=4"+
                         "\nFromDate=01.09.2019"+
                         "\nToDate=01.12.2019"+
                         "\nForwardMode=0"+
                         "\nDeposit=10000000"+
                         "\nCurrency=RUR"+
                         "\nProfitInPips=1"+
                         "\nLeverage=100"+
                         "\nExecutionMode=0"+
                         "\nOptimizationCriterion=6"+
                         "\nVisual=0";
    MTTESTER::SetSettings2(TesterInput);
    MTTESTER::ClickStart();
    while(!MTTESTER::IsReady() && !IsStopped())
      Sleep(100);
    CloseAllOtherCharts();
}

void OnStart()
{
  for(int i=0;i!=1000 && !IsStopped();++i)
  {
    StartTest("AFLT-12.19");
    StartTest("ALRS-12.19");
    Print((string)i);
  }
}
Документация по MQL5: Константы, перечисления и структуры / Коды ошибок и предупреждений / Ошибки компиляции
Документация по MQL5: Константы, перечисления и структуры / Коды ошибок и предупреждений / Ошибки компиляции
  • www.mql5.com
Импортируемая функция не может иметь такого параметра (нельзя передавать указатель, класс или структуру, содержащую динамический массив, указатель, класс и т.д.) Недопустимый возвращаемый тип. Например, такая ошибка будет...
 
traveller00:

Below is the minimum set for playback.

No playback. All 1000 tasks work. But you must have the checkbox for automatic opening of backtest charts checked, since you close charts by code. I have this option disabled. Perhaps this is the reason.

 
fxsaber:

the automatic opening of the backtest chart is ticked.

I'm going to ask you a lamer question. Where is this tick box? I could not find it in MT5.

 
traveller00:

This is going to be a lamer question. Where is this tick box? I could not find it in MT5.

 
traveller00:

Your script should suspend the Terminal if you try to remove it.