Strategy tester - Strange optimization results

 

Hi there,


I tried to optimize my program in the strategy tester. 

But when i maximise on balance max its seems that the EA doesnt have random end results:

It seems to max out at 12080 and 8890 with no passes in between.

The EA uses stop loss and TP and minimum amount of trades per pass is 200. 

What could cause this kind of results?


Strange results

 
Francois Dominique Izaak Huibregtse:

Hi there,


I tried to optimize my program in the strategy tester. 

But when i maximise on balance max its seems that the EA doesnt have random end results:

It seems to max out at 12080 and 8890 with no passes in between.

The EA uses stop loss and TP and minimum amount of trades per pass is 200. 

What could cause this kind of results?



First, is that on genetic or full optimization?

If it's genetic, that's not entirely uncommon - it tends to cluster around the best value it finds until it finds a better value, and then clusters there. You'll see staggered lines like that.

As far as those lines, what it probably means is that some of the inputs have little or no impact on the results, or at least not outside of a certain range. For example, the stop loss will affect the results until it hits the point that it's never triggered. Any value greater than that will run as a test, but have the same result. Similarly, if you have a take profit but also a possible indicator exit, or a trailing stop, at some point the take profit doesn't get triggered, because it's exiting based on the indicator conditions or the trailing stop. So any values above that in your take profit test range won't change the results.

These are just examples of inputs that have a threshold effect at some point. As another example, let's say you test RSI values from 70 to 100, step 1. But there's only one 2 trades at, say, 80, and another at 90. So testing 81-82-83, etc., are all going to have the same output. And the same thing again at 90-91-92, etc.

Even if you're doing full optimization. But the lines like that, getting denser from left to right, that pretty much only happens on genetic optimization.

Suggestion:  export your results to XML, look at the input values for just your top results. Narrow your optimization range to just those ranges and try it again, preferably as a full optimization if you can.

 
Francois Dominique Izaak Huibregtse:

Hi there,


I tried to optimize my program in the strategy tester. 

But when i maximise on balance max its seems that the EA doesnt have random end results:

It seems to max out at 12080 and 8890 with no passes in between.

The EA uses stop loss and TP and minimum amount of trades per pass is 200. 

What could cause this kind of results?



Is there a max open trades (simultaneously) limitation ? 

You could try the custom max optimization where instead of tp and sl you would take all the signals (if you have the above limitation) and you would measure max drawup and max drawdown with a holding period limit per signal . You should start the optimization from the most loose configuration . So at first you'd measure the "potential" . Then you'd get the best "potential" and optimize for management of trades . The mt5 genetic algorithm will keep testing as long as it keeps finding "ground" to improve . So this way you make the problem more "walkable" for the algorithm . 

The danger with the custom max is if you take just a risk:reward formula for the fitness then it might just pick the configuration that produces one trade with the best risk reward , and , if you go by dead sum of drawup-drawdown it will go for the config with most trades .

 
Thank you both for the explanation and it helpen me with further testing.
Reason: