MT4-Tester VS MT5-Tester - page 2

 
fxsaber:

Overkill (100,000 USD at the start)

You have a strange notion of describing testing conditions.

This approach to detail casts a great shadow over all your subsequent conclusions.

 
fxsaber:

This does not work now in MT4.

It works now in MT4.

Prove and explain technically how this is achieved.


I have no aim to denigrate MT5. I am only making a reproducible comparison. Certainly the MT5 tester is unattainable in some respects, but the MT4 tuning is also now able to give things that MT5 doesn't have, but which are really in demand. We have seen that an accurate test on real custom ticks on MT4 is 100% true. Well, and the regulation of all sorts of settings (commission, indents, rules of activation of pending orders, etc.) of the tester is there. In general, there are things, which are not implemented in MT5 yet.

Is there or is there accurate evidence that the slips and activation rules are exactly how they work as stated?

Can you technically prove and explain how an external program can change the order triggering conditions in the MT4 tester engine? Not by deep injection into this engine?

 
Renat Fatkhullin:

You have a strange notion of describing test conditions.

Such an approach to detail casts a great shadow over all your subsequent conclusions.

If I didn't tell you something, I didn't do it on purpose. I think I gave you all the data earlier. But I will repeat it once again.

  • Complete overkill.
  • You start with 100 000 USD.
  • Ranges are on the screenshots.
  • No conditions for forced breakout of the pass have been set.
  • Real EURUSD M1 ticks 2017.04.10 - 2017.04.16 (week).
  • Only one local agent (1 core) is enabled.

 
Is there any way to actually measure how many percentages are attributed in a given MT5 test:
Encrypting test parameters (results) => Send to loopback => Decrypt test parameters (results)

If we take 50 ms from the ceiling, we get 260 * 2 * 50 / 1000 = 26 sec.
Which is not too little.
It would be interesting to know the real figures.
 

Renat Fatkhullin:
Докажите и объясните технически, как это достигается.

How it is technically achieved - I don't know. Prove it - not ready right away (I will after sleep).

Is there or is there accurate evidence that slippage and activation rules are exactly as stated?

Can you technically prove and explain how an external program may change order triggering conditions in the MT4 tester engine? Not by deep injection into this engine?

The mere fact that the spread has not been fixed for years suggests that the inject is deep. This MT4 feature is very popular on many forums. The only thing that discourages it is that it's not free. But the trial is full-fledged, so everyone can try it. Actually I installed the trial itself a few hours ago to create this thread.

Constructive will be able to support only after a little rest. Actually, everyone can check the statements already now if desired.

 
First 20/260 passes
QR      0       03:29:37.031    Tester  0 : passed in 0:37:27.366
HK      0       03:30:36.307    Tester  1 : passed in 0:00:58.406
MM      0       03:30:40.510    Tester  2 : passed in 0:00:04.196
OF      0       03:30:41.731    Tester  3 : passed in 0:00:01.217
IH      0       03:30:42.538    Tester  4 : passed in 0:00:00.811
MQ      0       03:30:44.880    Tester  5 : passed in 0:00:00.764
LK      0       03:30:45.577    Tester  6 : passed in 0:00:00.687
PL      0       03:30:46.255    Tester  7 : passed in 0:00:00.671
MF      0       03:30:46.929    Tester  8 : passed in 0:00:00.671
GO      0       03:30:47.602    Tester  9 : passed in 0:00:00.671
CO      0       04:15:27.776    Tester  10 : passed in 0:44:40.160
ND      0       04:17:28.477    Tester  11 : passed in 0:01:59.450
HM      0       04:17:34.594    Tester  12 : passed in 0:00:06.099
CK      0       04:17:36.172    Tester  13 : passed in 0:00:01.575
QP      0       04:17:37.080    Tester  14 : passed in 0:00:00.905
LN      0       04:17:37.840    Tester  15 : passed in 0:00:00.765
NG      0       04:17:38.555    Tester  16 : passed in 0:00:00.702
ML      0       04:17:39.244    Tester  17 : passed in 0:00:00.687
RJ      0       04:17:39.925    Tester  18 : passed in 0:00:00.670
CS      0       04:17:40.603    Tester  19 : passed in 0:00:00.671

Input parameters

You can see that there are wild brakes when Shift = 1. For example, here's how MT4 manages with zero pass

2017.05.08 04:47:13.779 EURUSD,M1: 1865415 tick events (7292 bars, 1865515 bar states) processed in 0:00:33.541 (total time 0:00:34.289)

I.e. more than 60 times faster.


SZ

Forum on trading, automated trading systems & strategy testing

Bugs, bugs, questions

fxsaber, 2017.04.26 15:08

Please show range and step of optimized parameters in optimizer logs.

And also in agent logs such lines

NS      0       14:11:00.853    Tester  756 : passed in 0:00:04.789
MJ      0       14:11:03.447    Tester  757 : passed in 0:00:02.574
RM      0       14:11:05.860    Tester  758 : passed in 0:00:02.340

Accompany with information on the relevant run - EA name and its input parameters.

 
fxsaber:

It can be seen that the wild brakes when Shift = 1. For example, here is how MT4 handles zero passes

It became pointless to wait for the optimisation to finish, so I stopped.

Running a zero single pass showed (didn't wait for completion) that as the pass was running, the performance of the tester dropped very much.

History functions are not involved.

 
fxsaber:

If I didn't say it right, I didn't mean it. I think I gave you all the details earlier. But I will say it again.

  • Total overkill.
  • Start at 100 000 USD.
  • Ranges are on the screenshots.
  • No conditions for forced breakout of the pass have been set.
  • Real EURUSD M1 ticks 2017.04.10 - 2017.04.16 (week).
  • Only one local agent (1 core) enabled.

Ok, here are my results on the same (only Alpari-MT5-Demo server):

  • Windows 10 Pro, Intel Xeon E5-2690 @ 2.60GHz

  • 1 core: 27 mins 55 secs
    2017.05.08 05:13:09.636 Tester          optimization finished, total passes 260
    2017.05.08 05:13:09.647 Statistics      optimization done in 27 minutes 55 seconds
    2017.05.08 05:13:09.647 Statistics      local 260 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
    

  • 8 cores: 6 minutes 11 seconds
    2017.05.08 04:38:18.663 Tester          optimization finished, total passes 260
    2017.05.08 04:38:18.674 Statistics      optimization done in 6 minutes 11 seconds
    2017.05.08 04:38:18.674 Statistics      local 260 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
    
  • 24 cores: 3 minutes 33 seconds
    2017.05.08 05:17:40.990 Tester          optimization finished, total passes 260
    2017.05.08 05:17:41.000 Statistics      optimization done in 3 minutes 33 seconds
    2017.05.08 05:17:41.000 Statistics      local 260 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
    

Clearly there is no point in optimising in a single core in MT5 and even on 8 cores everything goes very fast. I'm sure your 14 minutes in MT4 is done on a CPU close in power per core, so the times can be compared. I even have a frequency per core of only 2.6 Ghz.

Why is there no linear reduction in time? Because the tasks are uneven because of the number of trades. Some passes have 100 trades (the calculation takes a second), and some have 230,000 trades (up to 50 seconds). Since the calculation speed is fully determined by whom and how the longest passes are distributed, the critical path in packages is not greatly reduced.


Your lags are purely due to the inefficient transaction history scanning in the release version. The slowdown cases are passes with 200,000 or more trades.

The entire example of the Expert Advisor is written so that it does only one thing - it scans the entire history of trades on every tick in a terribly inefficient way. That is 1.8 million full rescans of the entire history per one pass. And what's more, the code of MT5 selections is not native, but a crutch in the form of MT4 style wrapper, that gives even more expenses.


As I showed earlier, we have drastically rewritten the operation and sampling of large trade histories and now there is no difference in the depth of history.

Attached the latest build 1598 to check, where everything runs fast. Simply replace the files in the MetaTrader 5 directory.

Here is the log of the passes:

OK      0       04:45:17.505    History EURUSD,M1: history cache allocated for 484457 bars and contains 473528 bars from 2016.01.04 00:00 to 2017.04.07 23:59
IR      0       04:45:17.540    History EURUSD,M1: history begins from 2016.01.04 00:00
RF      0       04:45:24.469    Tester  0 : passed in 0:00:07.188
KO      0       04:45:26.727    Tester  1 : passed in 0:00:02.188
CQ      0       04:45:27.857    Tester  2 : passed in 0:00:01.109
QJ      0       04:45:28.758    Tester  3 : passed in 0:00:00.890
NL      0       04:45:29.525    Tester  4 : passed in 0:00:00.750
ME      0       04:45:30.237    Tester  5 : passed in 0:00:00.688
LO      0       04:45:30.923    Tester  6 : passed in 0:00:00.671
RP      0       04:45:31.612    Tester  7 : passed in 0:00:00.672
NJ      0       04:45:32.363    Tester  8 : passed in 0:00:00.734
RS      0       04:45:33.065    Tester  9 : passed in 0:00:00.687
MK      0       04:45:42.777    Tester  10 : passed in 0:00:09.703
HP      0       04:45:45.928    Tester  11 : passed in 0:00:03.094
EN      0       04:45:47.354    Tester  12 : passed in 0:00:01.406
HG      0       04:45:48.313    Tester  13 : passed in 0:00:00.953
LL      0       04:45:49.110    Tester  14 : passed in 0:00:00.781
QJ      0       04:45:49.828    Tester  15 : passed in 0:00:00.703
NS      0       04:45:50.523    Tester  16 : passed in 0:00:00.688
MH      0       04:45:51.215    Tester  17 : passed in 0:00:00.672
DF      0       04:45:51.901    Tester  18 : passed in 0:00:00.672
FO      0       04:45:52.646    Tester  19 : passed in 0:00:00.735
NE      0       04:46:04.884    Tester  20 : passed in 0:00:12.219

A zero pass with 216k trades (Shift=1, Limit=5 parameters) worked out in 7 seconds.

Files:
MetaTester64.zip  7571 kb
terminal64.zip  14201 kb
 
Renat Fatkhullin:

The entire Expert Advisor example is written in such a way that it does only one thing - it scarily inefficiently scans the entire deal history on every tick. That is 1.8 million full rescans of the entire history of trades per one pass. And the MT5 code is not native, but crutch in the form of MT4 style wrapper, which gives even more expenses.

Proof
bool Func1( datetime, datetime ){ return false; };
bool Func2( long ){ return false; };

#define HistorySelect Func1
#define HistorySelectByPosition Func2

#include <MT4Orders.mqh> // https://www.mql5.com/ru/code/16006

Forum on trading, automated trading systems and trading strategy testing

MT4-Tester VS MT5-Tester

fxsaber, 2017.05.08 01:11

If there is any doubt that the MT5 slowdown is caused by using a third party library, those willing can rewrite the simple MT4 logic of this EA in MQL5 in their own way and test the hypothesis.
 
Renat Fatkhullin:

As I showed earlier, we have drastically rewritten the operation and sampling of large trade histories and now there is no difference in depth of history.

I have attached the latest build 1598 to check, where everything works quickly. Simply change the files in the MetaTrader 5 directory.

1598 works much faster than 1596. And it works even in places where History functions are not used at all. Apparently, the terminal caused those slow functions in its guts during the run.


Optimizing MT4

2017.05.08 02:35:33.074 Lucky: optimization started
2017.05.08 02:49:51.431 Lucky: optimization finished in 0:14:18
2017.05.08 02:49:51.436 There were 260 passes done during optimization


Optimizing MT5

2017.05.08 07:40:38.429 Tester  Experts\MT4Orders\Lucky.ex5 on EURUSD,M1 from 2017.04.10 00:00 to 2017.04.16 00:00
2017.05.08 07:40:38.597 Tester  EURUSD: preliminary downloading of history ticks started, it may take quite a long time
2017.05.08 07:40:39.600 Tester  EURUSD: preliminary downloading of history ticks completed, 100.38 Kb in 0:01.170 (85.80 Kb/sec)
2017.05.08 07:40:39.600 Tester  EURUSD: ticks data begins from 2016.11.01 00:00
2017.05.08 07:40:39.600 Tester  complete optimization started
2017.05.08 07:40:39.600 Tester  size of initial task batch is 260
2017.05.08 07:40:39.612 Core 1  agent process started
2017.05.08 07:40:39.612 Core 1  connecting to 127.0.0.1:3000
2017.05.08 07:40:41.620 Core 1  connected
2017.05.08 07:40:41.622 Core 1  authorized (agent build 1598)
2017.05.08 07:40:42.771 Core 1  common synchronization completed
2017.05.08 07:40:42.797 Core 1  EURUSD: ticks synchronized already [43 bytes]
2017.05.08 08:04:54.332 Tester  optimization finished, total passes 260
2017.05.08 08:04:54.342 Statistics      optimization done in 24 minutes 16 seconds
2017.05.08 08:04:54.342 Statistics      local 260 tasks (100%), remote 0 tasks (0%), cloud 0 tasks (0%)
2017.05.08 08:04:54.342 Core 1  connection closed


Now MT5 is 1.7 times slower than MT4.


ZS Not all runs matched perfectly. So one of the three is definitely lying (MT4+TDS, MT5, MT4Orders). We will search.

Reason: