Forum

Is metatrader itself well optimized?

Is it written with for example branchless programming and bit twiddling? Or is it written in an academic software programmer way? I have been reading https://johnnysswlab.com/ and started wondering how much performance can be squeezed out from an ea if the platform is not well optimized? Is it well

Accessing "history" data in strategy testing

In strategy testing I need history data, even before the start date of the test. How can I request it? Bars will only provide data from after the start date. As one optimisable parameter is the length of the data I use at one time, my tests are inconsistent as the actually testing won't start at the

Incorporating stop out info into ontester function

Hi, I am running some optimisations, and with some more aggressive settings, the algorithm performs very good, but when I do a single run, it turns out that stop out occurs. What would be good, is not to include the original score of how good the algorithm performed, but in case it was terminated by

Iterating through positions and closing one. What happens on the next iteration?

Hi, On every tick I am iterating through all my open positions, and depending on certain criteria I will close it or not. What puzzles me, if I start iterating through and say have 100 open positions and I close the 50th, what will happen on the next - 51st - iteration? Because I imagine the

Iteration number limitations in strategy tester optimization

There are limitations in mt5, if the product of the iterations numbers of the parameters for optimization is bigger than 100 million or so, it will only run a genetic algorithm, regardless if a full optimization was selected. Seems to be an internal bug, makes owning your own fancy expensive server

Difference between a deal and a trade?

Hi What is the difference between a deal and a trade? https://www.mql5.com/en/docs/constants/environment_state/statistics#enum_statistics

Saving only parts of the optimization results, mql5

Is it possible to save only the used parameters for the top 10 passes from the optimization results? With higher pass numbers the logged results file (starting from terminal) can be tens of gigabytes, which is unnecessary. So I was wondering if in the OnTesterDeinit() function, results can be

How to implement new optimisation method for strategy testing?

Hi, I see it is possible to run genetical based algorithm for selecting the "best" parameters , however as with all optimisations, it is a possibility that it will settle into a local extremum, instead of the global one. Still to avoid running a complete multi dimensional scan, I learned a technique

Strategy tester optimisation with not independent parameters and ranges

Hi, Quick question, if you try to run strategy tester , where your variables are not independent, i.e. the range of variable A depends on the value of variable B. As such there is no reason to scan optimisation parameters beyond a certain point, while for other values of B, it would make sense. So