MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement - page 23

 
Slava:

Tester stopped because OnInit returns non-zero code

That's why there are no statistics.

Thanks, I will keep you informed. It's interesting that the charts are still built with the trades made.

 
Andrey Pogoreltsev:

The agents overload the memory when trying to go through the Mexican and do nothing, and their task count only grows. The logs show the following errors:

You have to look at the agent logs.

Error 14 means zero bid price for this tool. That is, there is a left bar in the history

PS It's better to run a single test. Then the error is sure to hit the tester agent's log. When optimising, errors are only displayed until OnInit is finished

 

The group icon disappears when all are closed, the option to select a parameter for optimisation disappears.


input group "ORDER"
input double K = 30;
input double TP_0 = 500;
input double MaxLoss = 0.25;
input group "FUNCTIONS"
input bool MultipleStopOrders = true;
input bool CloseAllPosReversSig = true;
input group "MONEY MANAGEMENT SETTING"
input double StartLot = -0.01;
input group "ORDERS SETTING"
input int MagicNumber_ = 2000; // Magic Number
input int Slippage = 50;       // Slippage
 
Slava:

Big request not to change input parameters of EA, which are not set in clipboard.

Forum on trading, automated trading systems and strategy testing

Libraries: MultiTester

fxsaber, 2019.11.06 11:24

When looking at a large number of optimization caches after a multitester run, you do the same thing.

  1. You choose the best pass to run a single run (via PCM).
  2. If you like it, you disable the optimization and increase the interval.
  3. You press Start.

Most of the time is spent on step 2. This often results in errors. We would like to semi-automate. And there is a solution!


Copy this text to the clipboard.

[Tester]
Optimization=0
FromDate=2019.01.01


Then just press CTRL+V in the Settings tab. This will automatically disable optimization and set the right date.


ZZZ was in a hurry to get excited. EA input parameters are reset to default with this buffer.

 
fxsaber:

A big request not to change the input parameters of an EA that is not set on the clipboard.

Yes. Correct the behaviour.

PS The described behaviour is not reproducible. If there is no [TesterInputs] section in the inserted text, the Expert Advisor settings tab is not touched at all

 
Slava:
Yes. Correcting the behaviour

Thank you!

 
fxsaber:

Thank you!

Not playing
 
Slava:

PS The described behaviour is not reproduced. If there is no [TesterInputs] section in the text to be inserted, the Expert Advisor settings tab is not touched at all

Expert Advisor

input int Range = 0; // 0 .. 100

double OnTester() { return(Range); }


Playback


 
Probably, this standard functionality won't make anyone worse off.

Forum on trading, automated trading systems and trading strategies testing

Features of mql5 language, tips and tricks

fxsaber, 2019.11.06 16:57

Sometimes in genetic optimization the first few thousand passes are enough to already understand the outcome more or less.

When you automatically run a lot of optimizations, you want it all to work faster. That is why we will need a mechanism to interrupt optimization.

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

// Выключает Оптимизацию ( и одиночный проход)
bool OptimizationStop( void )
{
  return(!MTTESTER::IsReady() && MTTESTER::ClickStart(false));
}


Application.

// Демонстрация прерывания Оптимизации.

sinput int inAmountPasses = 20; // Через сколько проходов закончить
input int Range = 0; // 0..10000

double OnTester()
{
  int Data[];
  
  return(FrameAdd(NULL, 0, 0, Data)); // Сгенерировали TesterPass
}

void OnTesterPass()
{
  static int Amount = 0;
  
  ulong Pass;
  string Name;
  long ID;
  double Value;
  int Data[];

  while (FrameNext(Pass, Name, ID, Value, Data))
    if (++Amount > inAmountPasses)
    {
      OptimizationStop(); // Как достигли нужного количества проходов, выключили оптимизатор.
      
      break;
    }
}
 
fxsaber:

Adviser


Playback


Let's get to the bottom of this