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

 
Sergey Golubev:
He's from a Chinese forum (he doesn't understand English either).
In the English part, we (often but not always) click on edit on the post, do a machine translation of the post from his language to English with the built-in translator, then click Update post.

But this should not be done categorically; it is very detrimental to readers. Showing initiative is often punishable.

 
Sergey Golubev:


Thank you for your help!
I will try to translate my post into Russian using the built-in translator at mql5.com.
Let's hope its quality is reliable.
After all, I understand some English, but I don't understand Russian at all.
 
tickfenix :
Thanks for all your help!
I will try to translate my post into Russian using the built-in translator at mql5.com.
Let's hope its quality is reliable.
After all, I understand some English, but I don't understand Russian at all.

Then a piece of advice: write it in your native language and below - its translation into English. That way it will be easier for the reader to correct machine translation errors.

Then advice: write in your native language and below - its translation into English. This will make it easier for the reader to correct machine translation errors.

 

2345 - broke the tester caches. The name of the EA (in the screenshot before the highlighted dots) is no longer in the name of the corresponding files.

For this reason, it is not possible to see the results of previous optimisations using GUI tools - they are missing in the dropdown selection list.


There are also zeros inside the files, instead of the name of the EA.

opt.


tst.


Search string: Oshibka 006.
 
fxsaber :



Z drive?

Do you also use the Windows mklink tool to link the MT5 tester folder to a folder on the RAM?

Could this be the cause of the strange errors that have been plaguing us for so long?


Drive Z?

Are you also using the Windows mklink tool to junction link the MT5 tester folder to a folder on a ram drive?

Could this be the reason for the weird errors that have plagued us for so long?

 
tickfenix:

Drive Z?

Are you also using the Windows mklink tool to junction link the MT5 tester folder to a folder on a ram drive?

Could this be the reason for the weird errors that have plagued us for so long?

Forum on trading, automated trading systems and strategy tester

MetaTrader 5 Strategy Tester: bugs, bugs, suggestions for improvement

fxsaber, 2019.09.16 14:11

I run such a batch file in Terminal folder once after rebooting my 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 log files are not created. To the eye, I haven't noticed any lags from the Tester yet. Seems to be a good solution.

Forum on trading, automated trading systems and strategy testing

Services. Already working?

fxsaber, 2019.06.07 06:37

Wrote a useful service
// Сервис проверяет наличие корректной папки Tester.
#property service

input string inFolderName = "Tester";

#include <WinAPI\fileapi.mqh>
#include <WinAPI\handleapi.mqh>

#define  GENERIC_WRITE                    0x40000000
#define  CREATE_ALWAYS                    2
#define  FILE_ATTRIBUTE_NORMAL            0x00000080
#define  FILE_FLAG_OVERLAPPED             0x40000000

bool FileIsInvalid_WinAPI( const string FileName )
{
  const HANDLE hFile = CreateFileW(FileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL);      
  const bool Res = (hFile != INVALID_HANDLE);
  
  if (Res)
  {
    CloseHandle(hFile);
    
    DeleteFileW(FileName);
  }
    
  return(Res);
}

void OnStart()
{
  const string FileName = TerminalInfoString(TERMINAL_PATH) + "\\" + inFolderName;

  if (!FileIsInvalid_WinAPI(FileName + "\\" + __FILE__))
    MessageBox(FileName + " is invalid!");  
}


When launching the Terminal, a warning appears immediately if the Tester folder is missing.


Great help if Tester on RAMDrive should be there.

 

The following bug keeps popping up. Who has the same problem?

After you run genetics, optimization results appear.

Poking at the optimization results for each result we run a single run of this result in the tester to check the smoothness of the curve, etc.

After several runs of singles from the exact "optimization results", the single run crashes and only terminal overloading helps, i.e. the single run doesn't start, start button doesn't react (no action when I press it). At the same time in the normal log writes something like - pass (and there is "number" for example pass 14, pass 255, etc.) It's already 3 years I'm sick and tired of it, when sometimes after 4-8 runs with 1 genetic result I have to restart the terminal, load the history of test result again and then restart the runs from it.

Anyone can reproduce from what I get - Do genetics, and poke around in the genetics results for single runs. Sometimes the tester will fail quickly and sometimes it will fail dozens of times (but less often).
Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
Тестирование стратегий - Алгоритмический трейдинг, торговые роботы - Справка по MetaTrader 5
  • www.metatrader5.com
Тестер стратегий позволяет тестировать и оптимизировать торговые стратегии (советники) перед началом использования их в реальной торговле. При тестировании советника происходит его однократная прогонка с начальными параметрами на исторических данных. При оптимизации торговая стратегия прогоняется несколько раз с различным набором параметров...
 
Askr:

Anyone can reproduce from what I get - Do genetics, and poke around single runs in the genetics results. Sometimes the tester fails quickly and sometimes it fails dozens of times (but less often).

I work with the tester a lot. But I do not remember such behaviour.

 
Askr :


I am also a frequent user of strategy testers.

I have not encountered the situation you mentioned.

The problem I encountered was that in most cases I could not get the correct test results from the optimisation task.

However, all the individual tests are correct.

This has nothing to do with genetic optimization or full optimization, most optimization tasks just return ridiculous results.

Probably related to some cache management mechanism or memory management mechanism, the strategy tester had one or more serious errors in the optimization function starting before version 2280.



I am also a frequent user of strategy testers.

I haven't come across the situation you mentioned either.

The problem I ran into was that in most cases, I couldn't get the right test results from the optimization task.

However, all individual tests are correct.

It has nothing to do with genetic optimization or full optimization, most optimization tasks just return ridiculous results.

Possibly related to some sort of cache management mechanism or memory management mechanism, starting with a version before 2280, the strategy tester had one or more serious bugs in the optimization feature.

 

Re-testing now at short notice and I'll write a bit more about it. I haven't tested large volumes myself for quite a long time.

Perhaps the latest versions are more stable, I could not find it, on the old version (2085) quickly enough repeated. True start is not completely stopped, just to some lines, the results of the test did not start in any way.

Again, it's not quite the problem I wrote above, but as an option.

For instance, I got the following info on build 2085.

Can someone decipher what is written in the agent log?

I understood the problem may be with agents.

1 попытка

2020.03.02 21:37:50.947 Core 1  connection closed
2020.03.02 21:37:53.773 Tester  single pass 7043 started
2020.03.02 21:37:53.799 Core 1  connecting to 127.0.0.1:3002
2020.03.02 21:37:53.800 Core 1  connected
2020.03.02 21:37:53.803 Core 1  disconnected
2020.03.02 21:37:53.803 Core 1  connection closed

журнал агента

2020.03.02 21:37:53.802 Network additional connect from 127.0.0.1
2020.03.02 21:37:53.910 Network previous connect context not freed
2020.03.02 21:37:53.910 127.0.0.1       cannot accept connect, agent is busy
2020.03.02 21:37:55.524 127.0.0.1       prepare for shutdown

2 попытка


то же что и в 1 попыткен/убралось/.

журнал агента

2020.03.02 21:40:07.936 Network additional connect from 127.0.0.1
2020.03.02 21:40:08.044 Network previous connect context not freed
2020.03.02 21:40:08.044 127.0.0.1       cannot accept connect, agent is busy
2020.03.02 21:40:09.925 127.0.0.1       prepare for shutdown

Yeah that's the case in the logs.

    2020.03.02 21:58:24.589	Core 1	connection closed
2020.03.02 21:58:28.488	Core 1	connecting to 127.0.0.1:3000
2020.03.02 21:58:28.489	Core 1	connected
2020.03.02 21:58:28.491	Core 1	disconnected
2020.03.02 21:58:28.492	Core 1	connection closed
2020.03.02 21:58:30.090	Core 1	connecting to 127.0.0.1:3000
2020.03.02 21:58:30.091	Core 1	connected
2020.03.02 21:58:30.095	Core 1	disconnected
2020.03.02 21:58:30.095	Core 1	connection closed

2020.03.02 21:58:24.503 Tester  EURUSD,H1: 24313 ticks, 6171 bars generated. Test passed in 0:00:00.112.
2020.03.02 21:58:24.503 Tester  242 Mb memory used including 1.41 Mb of history data, 64 Mb of tick data
2020.03.02 21:58:24.503 Tester  log file "C:\***************\20200302.log" written
2020.03.02 21:58:24.503         test Experts\***************.ex5 on EURUSD,H1 thread finished
2020.03.02 21:58:28.491 Network additional connect from 127.0.0.1
2020.03.02 21:58:28.599 Network previous connect context not freed
2020.03.02 21:58:28.599 127.0.0.1       cannot accept connect, agent is busy
2020.03.02 21:58:30.095 Network additional connect from 127.0.0.1
2020.03.02 21:58:30.203 Network previous connect context not freed
2020.03.02 21:58:30.203 127.0.0.1       cannot accept connect, agent is busy
2020.03.02 21:58:30.493 127.0.0.1       prepare for shutdown

I wrote here earlier about the problem:

https://www.mql5.com/ru/forum/1111/page2485#comment_12092720

https://www.mql5.com/ru/forum/1111/page2486#comment_12118579

https://www.mql5.com/ru/forum/315556/page3#comment_12072667

https://www.mql5.com/ru/forum/1111/page2483#comment_12072438

https://www.mql5.com/ru/forum/315556/page12#comment_12342692 by 2093 build

Ошибки, баги, вопросы
Ошибки, баги, вопросы
  • 2019.06.17
  • www.mql5.com
Общее обсуждение: Ошибки, баги, вопросы
Reason: