Discussing the article: "Self Optimizing Expert Advisors in MQL5 (Part 8): Multiple Strategy Analysis (Part 2)"

 

Check out the new article: Self Optimizing Expert Advisors in MQL5 (Part 8): Multiple Strategy Analysis (Part 2).

Join us for our follow-up discussion, where we will merge our first two trading strategies into an ensemble trading strategy. We shall demonstrate the different schemes possible for combining multiple strategies and also how to exercise control over the parameter space, to ensure that effective optimization remains possible even as our parameter size grows.

In our last discussion, we built a superclass to serve as the foundation for all our trading strategies. This superclass allowed us to implement our first strategy, a moving average crossover, in MQL5. Afterward, we compared our flexible strategy class with a hard-coded version of the same strategy to verify that the performance matched.

Using the MetaTrader 5 strategy tester, we were able to find strong parameter settings for it. Finding good parameters on your own can be challenging. That’s why the genetic optimizer in MetaTrader 5 is such a valuable tool. It helps automate the process, saving time and effort. 

We also used forward testing techniques to filter out stable parameter sets from our results. This confirmed that our implementation was accurate and efficient.

Today, we’re going a step further. We’ll create a second strategy based on the Relative Strength Index (RSI) and then merge it with our moving average crossover strategy. By combining them, we aim to create a more robust and potentially more profitable ensemble strategy. We'll also use the MetaTrader 5 strategy tester to optimize this new combined strategy. But before we dive in, it’s important to talk about a key concept: parameter minimization.