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

 

After optimisation, I found this

In two passes, where profits and drawdowns are very close, the recovery factor is very different.


ZZY The raw mode "by pips". I do not recommend using it yet. Especially if you are optimizing.

 

The MT5 optimiser has no such MT4 feature.



So you have to do it this way.

sinput uint inMaxOrders = 0; // Максимальное количество ордеров.
sinput double inMaxAbsoluteDD = 0; // Максимальная абсолютная просадка

bool IsMaxOrders()
{
#ifdef __MT4ORDERS__
  return(inMaxOrders && MT4ORDERS::LastTradeResult.order > inMaxOrders);
#else
  return(false);
#endif
}

bool IsMaxAbsoluteDD()
{
  static const double StartBalance = AccountInfoDouble(ACCOUNT_BALANCE);

  return(inMaxAbsoluteDD && ((StartBalance - AccountInfoDouble(ACCOUNT_EQUITY)) > inMaxAbsoluteDD));
}

void OnTick()
{
  static const bool IsTester = MQLInfoInteger(MQL_TESTER);
  
  if (IsTester && (IsMaxOrders() || IsMaxAbsoluteDD()))
  {
  #ifdef __MQL5__
    TesterStop();
  #else // __MQL5__
    ExpertRemove();
  #endif // __MQL5__
    
    return;
  }
// ....


Otherwise it will be very bad and take a long time.

 

After Optimisation, Agents do not unload for some time (a decent number of minutes) while in combat readiness. This is a really cool solution.

Sometimes Agents eat up a lot of memory, which is needed after Optimization. So decided to free it up by disabling them.


However, they, didn't unload.


Is it possible to make them unload by "Disable" menu item or create "Unload Forced" menu item?

 
Does the Tester report "Maximum position holding time" not take into account weekends?
 

Performance.

Single run
SSD
Single run
RAM-Drive
Second optimizer pass
SSD/RAM-Drive
Single Pass
Virtual
Second pass Optimizer
Virtual
72 seconds 64 seconds 28 seconds 26 seconds 18 seconds


Single runs were done "hot" - after the first single run a second run was started immediately.

Something needs to be done about the single run braking. It's 2.5 times slower than Optimizer.

And it's not just about redundant logs. Virtual doesn't log anything, but it is still much faster in the optimizer.

 

Is it a good solution to completely hide the ranges of input parameter changes when a single run is selected?


When I load a set file, it used to be immediately visible from which optimisation it was selected. Now it is not.


ZZY Until you check the box, you can't see the range. This has become very inconvenient. And when the box is checked, you can't see the default value.

 

Guys, I'm sick of the single pass logs. Absolutely impossible to work with RAM-Drive because of them. Gigabytes of rubbish in a few single passes. It's a real nasty piece of junk. RAM-Drive gets clogged very quickly.

I use Virtual. I have no problems with it in this sense. Nevertheless, I would like to radically solve this problem via WinAPI.


Can you advise me to automatically crash Tester\Agent-127.0.0.1-300x\logs\*.log files before running a single run? I want to write a solution once and forget about this nastiness forever.

The problem is that even manually these files cannot be removed since they are occupied by the Terminal. There is an option Unlocker. I will have to see if there is a console version.


In general, I'm asking for any help in this case.


SZY And what should make the maximum limit on the size of logs....

 
fxsaber:

Guys, I'm sick of the single pass logs. Absolutely impossible to work with RAM-Drive because of them. Gigabytes of rubbish in a few single passes. It's a real nasty piece of junk. RAM-Drive gets clogged very quickly.

I use Virtual. I have no problems with it in this sense. Nevertheless, I would like to radically solve this problem via WinAPI.


Can you advise me to automatically crash Tester\Agent-127.0.0.1-300x\logs\*.log files before running a single run? I want to write a solution once and forget about this nastiness forever.

The problem is that even manually these files cannot be removed since they are occupied by the Terminal. There is an option Unlocker. I will have to see if there is a console version.


In general, any help I can get in this case.


SZY And what should make the maximum limit on the size of logs....

Prohibit writing to logs folder?

 
Andrey Khatimlianskii:

Ban writing to the logs folder?

This option does not work.


I run such a batch file in Terminal folder once after rebooting the computer.

rem Создали RAM-Drive для Тестера.
imdisk -a -o awe -s 3 G -m Z: -p "/fs:ntfs /q /y /v:MT5Tester"

mkdir z:\Tester
mklink /j Tester z:\Tester

rem Кеш оптимизатора будет сохраняться на диске.
mkdir cache
mklink /j z:\Tester\cache cache

rem Временный RAM-Drive, чтобы на него можно было перенаправить log-папки.
imdisk -a -o awe -s 3 M -m Y: -p "/fs:ntfs /q /y /v:MT5Tester_Logs"

mkdir y:\logs
mklink /j Tester\logs y:\logs

mkdir y:\logs0
mkdir Tester\Agent-127.0.0.1-3000
mklink /j Tester\Agent-127.0.0.1-3000\logs y:\logs0

mkdir y:\logs1
mkdir Tester\Agent-127.0.0.1-3001
mklink /j Tester\Agent-127.0.0.1-3001\logs y:\logs1

mkdir y:\logs2
mkdir Tester\Agent-127.0.0.1-3002
mklink /j Tester\Agent-127.0.0.1-3002\logs y:\logs2

mkdir y:\logs3
mkdir Tester\Agent-127.0.0.1-3003
mklink /j Tester\Agent-127.0.0.1-3003\logs y:\logs3

mkdir y:\logs4
mkdir Tester\Agent-127.0.0.1-3004
mklink /j Tester\Agent-127.0.0.1-3004\logs y:\logs4

mkdir y:\logs5
mkdir Tester\Agent-127.0.0.1-3005
mklink /j Tester\Agent-127.0.0.1-3005\logs y:\logs5

mkdir y:\logs6
mkdir Tester\Agent-127.0.0.1-3006
mklink /j Tester\Agent-127.0.0.1-3006\logs y:\logs6

mkdir y:\logs7
mkdir Tester\Agent-127.0.0.1-3007
mklink /j Tester\Agent-127.0.0.1-3007\logs y:\logs7

rem Убили временный RAM-Drive
imdisk -D -m Y:


After that, no log files are created. So far I haven't noticed any lags on the Tester's side. Seems to be a working solution.

 
fxsaber:

This option does not work.

How do you prohibit recording?