MT4 strategy RE-tester plugin

 
Hello,

Is it possible to code (I would order a Freelance job if so) a plugin that re-runs MT4 (genetic) test results 1 by 1 and either save the results in excel or open the tabs in firefox?

The problem I have while strategy-testing is that many results are given as similar but when I input the settings and re-run the tests manually one-by-one then the real results show up...

Thanks!
 
grivois:
Hello,

Is it possible to code (I would order a Freelance job if so) a plugin that re-runs MT4 (genetic) test results 1 by 1 and either save the results in excel or open the tabs in firefox?

The problem I have while strategy-testing is that many results are given as similar but when I input the settings and re-run the tests manually one-by-one then the real results show up...

Thanks!
Which Spread setting are you using ? If you get difference results on a single test than during an optimization, it's most probably because your trading environment changed. Most common cause is the spread.
 
Alain Verleyen:
Which Spread setting are you using ? If you get difference results on a single test than during an optimization, it's most probably because your trading environment changed. Most common cause is the spread.
Hello Alain,

I'm using the fixed spread of 5 for both Genetic + re-running manual tests... so same spread with completely different results! I understand genetic optimizer is only an approximation of the real results in order to save time... is a plugin like I want possible to code you think?

Thanks!
 
grivois:

I'm using the fixed spread of 5 for both Genetic + re-running manual tests... so same spread with completely different results! I understand genetic optimizer is only an approximation of the real results in order to save time... is a plugin like I want possible to code you think?

You need no a plugin, you need to figure out what is wrong with your settings. Normally optimization results should match any successive single test results

Genetic optimization is not an approximation - this is just a method of selective enumeration of input parameters instead of brute force full enumeration.

No matter if genetic is enabled or not, a specific parameter set should always produce same results.

Unfortunately, we can't help more until you provide more details. 

 
Hello Stanislav, I am pretty sure this is a coding bug with MT4 itself. The process is very simple: 1- I run Optimization through genetic algorithm; 2- Then I go under Optimization Result tab and I simply right click on Set Input Parameters, then I start the (single) test again… and the result is very often different, and sometimes wildly, but sometimes it stays the same too. To make sure this weekend I ran the entire testing without genetic algorithm (it took over 12 hours!) and at the end I ended up with the same best results as I had done with genetic + re-testing… maybe my EA has a bug with MT4 genetic code?!
 
grivois:
Hello Stanislav, I am pretty sure this is a coding bug with MT4 itself. The process is very simple: 1- I run Optimization through genetic algorithm; 2- Then I go under Optimization Result tab and I simply right click on Set Input Parameters, then I start the (single) test again… and the result is very often different, and sometimes wildly, but sometimes it stays the same too. To make sure this weekend I ran the entire testing without genetic algorithm (it took over 12 hours!) and at the end I ended up with the same best results as I had done with genetic + re-testing… maybe my EA has a bug with MT4 genetic code?!

Once again, genetics have nothing to do with the issue. Genetic is just a matter of how enumeration of input parameters is done, not how your expert trading is performed during single test or optimization pass.

I can imagine an expert which trades using some external data (for example, by reading/writing some stuff in custom files or global variables), then it can indeed screw the optimization. Otherwise, an expert runs entirely inside environment provided by the tester, so it must show exact results for the same input parameters (if you absolutely sure that constant spread is used).

P‌lease, provide more info, probably a screenshot with settings, optimization results, and single test results.

 
grivois: Hello Stanislav, I am pretty sure this is a coding bug with MT4 itself. The process is very simple: 1- I run Optimization through genetic algorithm; 2- Then I go under Optimization Result tab and I simply right click on Set Input Parameters, then I start the (single) test again… and the result is very often different, and sometimes wildly, but sometimes it stays the same too. To make sure this weekend I ran the entire testing without genetic algorithm (it took over 12 hours!) and at the end I ended up with the same best results as I had done with genetic + re-testing… maybe my EA has a bug with MT4 genetic code?!

I have on a few occasion had Optimisations not be consistent and the solution was closing MetaTrader, deleting the cache files (in ".\tester\caches") and logs (because they can get rather large), and "all as well again in the world"!

However, I don't run Optimisations very often, so I don't know if this problem is a common occurrence or of it was just due to some other "snaffu" on my PC such as fragmented RAM or file corruption.

 
grivois:
Hello Stanislav, I am pretty sure this is a coding bug with MT4 itself. The process is very simple: 1- I run Optimization through genetic algorithm; 2- Then I go under Optimization Result tab and I simply right click on Set Input Parameters, then I start the (single) test again… and the result is very often different, and sometimes wildly, but sometimes it stays the same too. To make sure this weekend I ran the entire testing without genetic algorithm (it took over 12 hours!) and at the end I ended up with the same best results as I had done with genetic + re-testing… maybe my EA has a bug with MT4 genetic code?!

BTW, just a guess. Could you probably have a typo/omission or other kind of hidden bug in your source code, which makes at least one variable changing randomly inside the program (during startup or in the process)? It's so easy to overlook proper initialization, so a variable can contain garbage (at least under some circumstamces).

T‌ry to optimize one of example expert advisers which are installed with the terminal. If this expert will show exact results during optimization and standalone tests, then the problem is most likely in your code.