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

 
Slava:

Testing/optimisation on real ticks?

Own Agents or from the cloud?

If testing on a custom symbol, then cloud agents fall away. So the agents are their own, and you can pull their logs and see in the logs how the history was synced

Custom, proprietary Agents, error-free synchronisation on real ticks. Expert Advisor for replay.

// Критерий оптимизации - сумма входных параметров + сумма нецелых частей секунды каждого тика (в миллисекундах).

input int inFakeRange1 = 0;
input int inFakeRange2 = 0;
input int inFakeRange3 = 0;
input int inFakeRange4 = 0;
input int inFakeRange5 = 0;

long Sum = inFakeRange1 + inFakeRange2 + inFakeRange3 + inFakeRange4 + inFakeRange5;

void OnTick()
{
  MqlTick Tick;
  
  if (SymbolInfoTick(_Symbol, Tick))
    Sum += Tick.time_msc % 1000;
}

double OnTester()
{
  return((double)Sum);
}


Result.

By the value of the first line, it's immediately clear that the value is nonsense: it can't be that different from the values in the other lines.


And running a single.


99% rubbish in ticks during GA optimisation. Let me know if you were able to reproduce it or not.

Search string: Oshibka 005.
 
fxsaber:

Custom, own Agents, error free synchronisation on real ticks. EA for playback.


Result.

By the value of the first line, it's immediately clear that the value is nonsense: it can't be that different from the values in the other lines.


And running a single.


99% rubbish in ticks during GA optimisation. Let me know if you were able to reproduce it or not.

Search string: Oshibka 005.

Have to look at the optimization log from the agent on which the nonsense value was issued.

And the test log of the corresponding single pass.

 
Slava:

You need to look at the optimisation log from the agent on which the nonsense value was issued.

And a test log of the corresponding single pass.

Look at the single value. It is correct and very different from all Optimizer values, not just one. I.e. the error is literally in every line of the Optimizer.

I'll look at the logs. It would be good for you to run it on your own.

2020.02.20 10:47:18.839 Core 6  genetic pass (5, 312) returned result 10563025086.000000 in 0:00:05.475
2020.02.20 10:47:20.023 Core 2  genetic pass (5, 209) returned result 8885031952.000000 in 0:00:04.947
2020.02.20 10:47:23.048 Core 3  genetic pass (5, 240) returned result 10373435790.000000 in 0:00:05.984
2020.02.20 10:47:23.366 Core 1  genetic pass (5, 181) returned result 10236426953.000000 in 0:00:05.654
2020.02.20 10:47:24.069 Core 4  genetic pass (5, 271) returned result 10597154696.000000 in 0:00:05.768
2020.02.20 10:47:24.509 Core 5  genetic pass (5, 296) returned result 10580660389.000000 in 0:00:05.853
2020.02.20 10:47:24.613 Core 6  genetic pass (5, 313) returned result 10563025078.000000 in 0:00:05.774
2020.02.20 10:47:25.113 Core 2  genetic pass (5, 218) returned result 8885031945.000000 in 0:00:05.089
Highlighted the correct value. Ran through the log. Only Core1 has the correct value.
 
fxsaber:

Ran through the log. Only Core1 has the correct value.

Completely localised. Single pass on Core1 does not match single pass on Core2. So I can't tell which one is correct yet.

 
fxsaber:

Completely localised. The single pass on Core1 is not the same as the single pass on Core2. So I can't say which one is correct yet.

What's in the agent logs? That's where the history sync is written.
 
Slava:
What's in the agent logs? That's where the history sync is written.

Tried different characters as it doesn't always reproduce. Agent Logs at Optimisation.

Core1.

EL      0       12:57:18.438    127.0.0.1       login (build 2323)
ND      0       12:57:18.455    Tester  account info found with currency USD
FO      0       12:57:18.456    Network 1482 bytes of tester parameters loaded
FF      0       12:57:18.456    Network 2748 bytes of input parameters loaded
DS      0       12:57:18.456    Tester  expert file added: Experts\Test123.ex5. 12221 bytes loaded
NK      0       12:57:18.456    Network 1032 bytes of optimized inputs info loaded
PM      0       12:57:18.527    Tester  successfully initialized
GE      0       12:57:18.527    Network 12 Kb of total initialization data received
JR      0       12:57:18.528    Tester  Intel Core i7-2700 K  @ 3.50 GHz, 16301 MB
OE      0       12:57:18.528    Tester  optimization pass 35025 started (batch of 53 tasks)
QQ      0       12:57:18.529    Symbols CHFJPY.rann_RannForex: symbol to be synchronized
RP      0       12:57:18.529    Symbols CHFJPY.rann_RannForex: symbol synchronized, 3720 bytes of symbol info received
LF      0       12:57:18.534    History CHFJPY.rann_RannForex: load 444 bytes of history data to synchronize in 0:00:00.001
EK      0       12:57:18.534    History CHFJPY.rann_RannForex: history synchronized from 2018.02.26 to 2020.02.14
FL      0       12:57:18.537    Ticks   CHFJPY.rann_RannForex: ticks synchronization started
ML      0       12:57:18.538    Ticks   CHFJPY.rann_RannForex: load 64 bytes of tick data to synchronize in 0:00:00.000
MK      0       12:57:18.538    Ticks   CHFJPY.rann_RannForex: history ticks synchronized from 2019.06.03 to 2020.02.14
MG      0       12:57:18.882    History CHFJPY.rann_RannForex,M1: history cache allocated for 740490 bars and contains 469972 bars from 2018.02.26 00:08 to 2019.05.31 23:54
CD      0       12:57:18.882    History CHFJPY.rann_RannForex,M1: history begins from 2018.02.26 00:08
QG      0       12:57:26.327    Tester  35025 OnTester result 6963974890 : passed in 0:00:07.795
JQ      0       12:57:31.481    Tester  5593 OnTester result 10077649365 : passed in 0:00:05.153
CE      0       12:57:32.683    127.0.0.1       tester forced to stop
DS      0       12:57:32.684    Tester  2 of 53 passes processed (2 successfully finished) in 0:00:12.948
CS      0       12:57:32.684            optimize Experts\Test123.ex5 on CHFJPY.rann_RannForex,M1 thread finished
HE      0       12:57:32.684    127.0.0.1       prepare for shutdown


Core2.

OS      0       12:57:18.438    127.0.0.1       login (build 2323)
IG      0       12:57:18.456    Tester  account info found with currency USD
OL      0       12:57:18.460    Network 1482 bytes of tester parameters loaded
OE      0       12:57:18.460    Network 2748 bytes of input parameters loaded
EP      0       12:57:18.460    Tester  expert file added: Experts\Test123.ex5. 12221 bytes loaded
GJ      0       12:57:18.460    Network 1032 bytes of optimized inputs info loaded
FM      0       12:57:18.532    Tester  successfully initialized
QJ      0       12:57:18.532    Network 12 Kb of total initialization data received
IS      0       12:57:18.532    Tester  Intel Core i7-2700 K  @ 3.50 GHz, 16301 MB
OG      0       12:57:18.532    Tester  optimization pass 115298 started (batch of 18 tasks)
IQ      0       12:57:18.533    Symbols CHFJPY.rann_RannForex: symbol to be synchronized
KP      0       12:57:18.533    Symbols CHFJPY.rann_RannForex: symbol synchronized, 3720 bytes of symbol info received
KE      0       12:57:18.545    History CHFJPY.rann_RannForex: load 444 bytes of history data to synchronize in 0:00:00.002
FD      0       12:57:18.545    History CHFJPY.rann_RannForex: history synchronized from 2018.02.26 to 2020.02.14
DK      0       12:57:18.546    Ticks   CHFJPY.rann_RannForex: ticks synchronization started
PO      0       12:57:18.547    Ticks   CHFJPY.rann_RannForex: load 64 bytes of tick data to synchronize in 0:00:00.000
HJ      0       12:57:18.547    Ticks   CHFJPY.rann_RannForex: history ticks synchronized from 2019.06.03 to 2020.02.14
JH      0       12:57:18.856    History CHFJPY.rann_RannForex,M1: history cache allocated for 740490 bars and contains 469972 bars from 2018.02.26 00:08 to 2019.05.31 23:54
PS      0       12:57:18.856    History CHFJPY.rann_RannForex,M1: history begins from 2018.02.26 00:08
EF      0       12:57:25.613    Tester  115298 OnTester result 14612465132 : passed in 0:00:07.073
GP      0       12:57:30.797    Tester  26858 OnTester result 9858144627 : passed in 0:00:05.184
DR      0       12:57:32.684    127.0.0.1       tester forced to stop
NR      0       12:57:32.684    Tester  2 of 18 passes processed (2 successfully finished) in 0:00:12.257
CP      0       12:57:32.684            optimize Experts\Test123.ex5 on CHFJPY.rann_RannForex,M1 thread finished
GF      0       12:57:32.685    127.0.0.1       prepare for shutdown
 
fxsaber:

Tried different characters as it doesn't always reproduce. Agent Logs at Optimisation.

Core1.


Core2.

And on one of these agents did you get the wrong results?
 
Slava:
And on one of these Agents did you get the wrong results?

I didn't have any logs of that situation, as I had forbidden to write logs. So I had to start another copy of the Terminal from scratch and repeat the experiment, where the logs are all written.

Above are the Optimization logs. There each Agent counted two passes, after which the Stop button was pressed, because OnTester-results are rambling for each of the Agents.

The logs of the two Agents above. I will try to create a situation that you can reproduce for yourself.

 
fxsaber:

I didn't have any logs of that situation, as I had forbidden to write logs. So I had to start another copy of the Terminal from scratch and repeat the experiment, where the logs are all written.

Above are the Optimization logs. There each Agent counted two passes, after which the Stop button was pressed, because OnTester-results are rambling for each of the Agents.

The logs of the two Agents above. I'll try to create a situation that you can reproduce for yourself.

That's exactly what I'm asking about the Agents logs. Were the results wrong for both agents?

I need to see agent logs with correct results and agent logs with incorrect results

 
Slava:

I'm asking specifically about the agents' logs. Were the results wrong for both agents?

I need to see agent logs with correct results and agent logs with incorrect results

Both Agents had the wrong results for the optimisation passes. I almost managed to reproduce it on a clean Terminal... I'll post it in a while.


By the way, what's the reason for the Agents still hanging in memory after closing the Terminal?