I think I found a bug in strategy tester - page 2

 
Fernando Carreiro:

My personal opinion is that this is a P.I.C.N.I.C. case, where due to you not fully understanding things, leads you to believe that the parameters are changing and that it is a bug, when in fact they are probably resetting due to various valid situations.

When you change your code and recompile, and the changes to the parameters are no longer compatible with the cached settings, they will reset.

When you run a Optimisation and the select one of the passes by a double click, the parameters will change accordingly, but if there is compilation between these actions then the parameters will reset.

There are several other scenarios where cache parameters will reset or change due to various conditions.

So, in essence, I don't believe it to be a bug, but more of a case that you are not fully aware of how the Strategy Tester behaves in these situations.

If however you still believe it a bug, then you will have to create a very detailed step-by-step recipe that will reproduce the problem so that other users can test it and confirm the issue. If you are not able to do that, then it will be ignored as noone else seems to be having the same problem.

Like I said, I can't tell what causes the change. I do nothing special before it happens. I don't modify the parameters in the code, only in the  Expert properties. I know how to change the parameters by double-clicking an optimisation result, too. I'm surprised I'm apparently the only one who has experienced this. Oh well it's not that big of a deal. I can live with it. It only happens very rarely. 

 
mt4ski:

Like I said, I can't tell what causes the change. I do nothing special before it happens. I don't modify the parameters in the code, only in the  Expert properties. I know how to change the parameters by double-clicking an optimisation result, too. I'm surprised I'm apparently the only one who has experienced this. Oh well it's not that big of a deal. I can live with it. It only happens very rarely. 

You have changed the EA properties while the code were not compiled yet.

 

I think I probably had that problem recently, or some similar bug, while I was working with a pretty heavy EA (one which loaded an indicator with 40+ parameters, in 30 currency pairs, which also loaded other 6-7 indicators)

I noticed that when I added it to charts, many of the indicators started giving 4002 errors and things about incorrect parameters, then when I tried to load the indicator to the charts its parameters had changed (for example I had a price enum input set to 200, which I checked with prints, and 200 was one of the other 40+ inputs). No changes after recompiling, only when I restarted MT5 they came back to normal until I put the EA again on the charts

My theory is that MT5 (not MT4 as you) run out of some kind of memory and started overwriting parameters in strange ways

My solution was to create another version of the indicator, delete all "input" tags and make them read a file written by the EA with their parameters and assign them to the now internal variables, the problem hasn't appeared again


Crazy thing is that I noticed that even my custom symbols disappeared (I don't know how both things could relate)

The problem may be reproducible by adding a multi-symbol EA to charts that reads indicators with multiple parameters similarly as I did, or some other very heavy stuff, I wouldn't recommend trying though heheh

 
Manuel Alejandro Cercos Perez:

40+ parameters

many of the indicators started giving 4002 errors

Even though I didn't notice any errors, my EA has 300 lines of parameters, so maybe you're right