MT4 Strategy Tester Optimiser.

 

Hello All, 

I would like to use the Strategy Tester Optimiser (MT4) to do random (use random combinations of my variables) passes, rather than the Genetic Algorithm optimise these variables for a particular factor (Profit etc). 

If anybody knows such a way to achieve this, I would be very grateful to hear from you. 

All the best, 

 

Well declare a counter to be varied by the tester 0 .. 999 999 999 999 and no Genetic optimization!

And vary your vars in OnInit(). But you have to print the varied vars otherwise you won't know them!

 
Carl Schreiber:

Well declare a counter to be varied by the tester 0 .. 999 999 999 999 and no Genetic optimization!

And vary your vars in OnInit(). But you have to print the varied vars otherwise you won't know them!

Hi Carl, thanks for your response.

From the documentation, it says that the print function won't work in optimisation strategy tester. So I am not sure if this method can work. 

Are you aware of a way around this?

Cheers,  



 
willcoll: it says that the print function won't work in optimisation strategy tester.
Results tab -> right click on a line -> copy -> paste somewhere.
 
willcoll:


I would like to use the Strategy Tester Optimiser (MT4) to do random (use random combinations of my variables) passes, rather than the Genetic Algorithm optimise these variables for a particular factor (Profit etc). 

If anybody knows such a way to achieve this, I would be very grateful to hear from you. 

Setup the tester to optimize custom value and return random value from OnTester event handler in EA code. Keep genetics on.
 
whroeder1:
Results tab -> right click on a line -> copy -> paste somewhere.
Thanks for your reply whroeder, 

I'm still having trouble. 

The results appearing in the results tab indeed show different results and so the code is generating the random variables.

However, in order for the variable name and value to appear in the 'inputs' section of the results. The variable has to be declared as extern. 

The 'inputs' column of the Results tab is telling me that the value of the variable is whatever its value is as it appears in the 'Expert Properties' of strategy tester
Despite the actual results of the optimisation passes all being different and thus this isn't the case. 

Thoughts greatly appreciated once again, 

Thank you
 
Stanislav Korotky:
Setup the tester to optimize custom value and return random value from OnTester event handler in EA code. Keep genetics on.

Thanks  Stanislav, 

I will read about the OnTester now, as I don't already have that function in my code. 

If you would be willing to give a little more into how this works it would be greatly appreciated.

Thanks again,  

Reason: