Buying or Selling all 7 pairs - page 4

 

Developing a multi-currency Expert Advisor (Part 14): Adaptive volume change in risk manager

Developing a multi-currency Expert Advisor (Part 14): Adaptive volume change in risk manager

In one of the previous articles of the series, I touched on the topic of risk control and developed a risk manager class that implements basic functionality. It allows setting a maximum daily loss level and a maximum overall loss level, upon reaching which trading stops and all open positions are closed. If a daily loss was reached, trading was resumed the next day, and if an overall loss was reached, it was not resumed at all.
Developing a multi-currency Expert Advisor (Part 12): Developing prop trading level risk manager
Developing a multi-currency Expert Advisor (Part 12): Developing prop trading level risk manager
  • www.mql5.com
In the EA being developed, we already have a certain mechanism for controlling drawdown. But it is probabilistic in nature, as it is based on the results of testing on historical price data. Therefore, the drawdown can sometimes exceed the maximum expected values (although with a small probability). Let's try to add a mechanism that ensures guaranteed compliance with the specified drawdown level.
 

Developing a multi-currency Expert Advisor (Part 15): Preparing EA for real trading

Developing a multi-currency Expert Advisor (Part 15): Preparing EA for real trading

We have already achieved certain results in the previous articles, but there is still much to do. The end result we would like to see is a multi-currency EA that can be set to work on a real account or several real accounts with different brokers. So far, our efforts have been focused on achieving good trading results during testing, since without this it is impossible to achieve good trading with a developed EA on a real account. Now that we have more or less decent test results, we can look a little towards ensuring correct operation on a real account.
Developing a multi-currency Expert Advisor (Part 15): Preparing EA for real trading
Developing a multi-currency Expert Advisor (Part 15): Preparing EA for real trading
  • www.mql5.com
As we gradually approach to obtaining a ready-made EA, we need to pay attention to issues that seem secondary at the stage of testing a trading strategy, but become important when moving on to real trading.
 

Developing a multi-currency Expert Advisor (Part 16): Impact of different quote histories on test results

Developing a multi-currency Expert Advisor (Part 16): Impact of different quote histories on test results

In the previous article, we started preparing the multi-currency EA for trading on a real account. As part of the preparation process, we added support for different names of trading instruments, automatic completion of trading when you want to change the settings of trading strategies, and correct resumption of the EA after restarting for various reasons.
Developing a multi-currency Expert Advisor (Part 16): Impact of different quote histories on test results
Developing a multi-currency Expert Advisor (Part 16): Impact of different quote histories on test results
  • www.mql5.com
The EA under development is expected to show good results when trading with different brokers. But for now we have been using quotes from a MetaQuotes demo account to perform tests. Let's see if our EA is ready to work on a trading account with different quotes compared to those used during testing and optimization.
 

Developing a multi-currency Expert Advisor (Part 17): Further preparation for real trading

Developing a multi-currency Expert Advisor (Part 17): Further preparation for real trading

In one of the previous articles, we already turned our attention to the EA improvements necessary for working on real accounts. Until now, our efforts have been focused mainly on getting acceptable EA results in the strategy tester. Real trading requires much more preparations.
Developing a multi-currency Expert Advisor (Part 17): Further preparation for real trading
Developing a multi-currency Expert Advisor (Part 17): Further preparation for real trading
  • www.mql5.com
Currently, our EA uses the database to obtain initialization strings for single instances of trading strategies. However, the database is quite large and contains a lot of information that is not needed for the actual EA operation. Let's try to ensure the EA's functionality without a mandatory connection to the database.
 

Developing a multi-currency Expert Advisor (Part 18): Automating group selection considering forward period

Developing a multi-currency Expert Advisor (Part 18): Automating group selection considering forward period

We have implemented automation of the second stage of optimization using the forward period. Again, no clear advantages were identified. The task turned out to be much broader and required more time than we initially expected. In the process, many new questions arose that are still waiting for their turn.

We were able to see that if a forward period falls on an unsuccessful period of the EA's work, then we seem not to be able to use it to select good combinations of parameters.

Developing a multi-currency Expert Advisor (Part 18): Automating group selection considering forward period
Developing a multi-currency Expert Advisor (Part 18): Automating group selection considering forward period
  • www.mql5.com
Let's continue to automate the steps we previously performed manually. This time we will return to the automation of the second stage, that is, the selection of the optimal group of single instances of trading strategies, supplementing it with the ability to take into account the results of instances in the forward period.
 

Developing a multi-currency Expert Advisor (Part 19): Creating stages implemented in Python

We accomplished the task and the hypothesis was confirmed. So, next looked at how we could improve the results of such automatic selection. It turned out that if we split the set of all single instances into a relatively small number of clusters and make sure that instances from the same cluster do not end up in it when selecting a group, then this will help not only improve the trading results of the final EA, but also reduce the time for the selection process itself. 

To perform clustering, we used a ready-made library scikit-learn for Python, or, more precisely, the implementation of the K-Means algorithm. This is not the only clustering algorithm, but considering other possible ones, comparing and choosing the best one, as applied to this problem, was beyond the acceptable limits. Therefore, essentially the first algorithm that came to hand was taken, and the results obtained using it turned out to be quite good.

Developing a multi-currency Expert Advisor (Part 19): Creating stages implemented in Python
Developing a multi-currency Expert Advisor (Part 19): Creating stages implemented in Python
  • www.mql5.com
So far we have considered the automation of launching sequential procedures for optimizing EAs exclusively in the standard strategy tester. But what if we would like to perform some handling of the obtained data using other means between such launches? We will attempt to add the ability to create new optimization stages performed by programs written in Python.
 

Developing a multi-currency Expert Advisor (Part 20): Putting in order the conveyor of automatic project optimization stages (I)

Developing a multi-currency Expert Advisor (Part 20): Putting in order the conveyor of automatic project optimization stages (I)

In this series of articles, we are trying to create an automatic optimization system that allows finding good combinations of parameters of one trading strategy without human intervention. These combinations will then be combined into one final EA. The objective is set in more detail in part 9 and part 11. The process of such a search itself will be controlled by one EA (optimizing EA), and all data that will need to be saved during its operation is set in the main database.
Developing a multi-currency Expert Advisor (Part 20): Putting in order the conveyor of automatic project optimization stages (I)
Developing a multi-currency Expert Advisor (Part 20): Putting in order the conveyor of automatic project optimization stages (I)
  • www.mql5.com
We have already created quite a few components that help arrange auto optimization. During the creation, we followed the traditional cyclical structure: from creating minimal working code to refactoring and obtaining improved code. It is time to start clearing up our database, which is also a key component in the system we are creating.
 

Developing a multi-currency Expert Advisor (Part 21): Preparing for an important experiment and optimizing the code

Developing a multi-currency Expert Advisor (Part 21): Preparing for an important experiment and optimizing the code

In the previous part, we started working on putting in order the automatic optimization conveyor, which allows us to obtain a new final EA taking into account the accumulated price data. However, we have not yet reached full automation, as difficult decisions still need to be made about how best to implement the final stages. They are difficult because if we make the wrong choice, we will have to redo a lot. Therefore, I really want to save my efforts and try to make the right choice. And nothing helps in making difficult decisions as much as... postponing them! Especially if we can afford it.
Developing a multi-currency Expert Advisor (Part 21): Preparing for an important experiment and optimizing the code
Developing a multi-currency Expert Advisor (Part 21): Preparing for an important experiment and optimizing the code
  • 2025.09.15
  • www.mql5.com
For further progress it would be good to see if we can improve the results by periodically re-running the automatic optimization and generating a new EA. The stumbling block in many debates about the use of parameter optimization is the question of how long the obtained parameters can be used for trading in the future period while maintaining the profitability and drawdown at the specified levels. And is it even possible to do this?
 

Developing a multi-currency Expert Advisor (Part 22): Starting the transition to hot swapping of settings

Developing a multi-currency Expert Advisor (Part 22): Starting the transition to hot swapping of settings

In the previous two parts of our article series, we made serious preparations for further experiments with auto optimization of trading EAs. 

In this new article, we will delve into the implementation of a new mechanism for loading parameters of final EAs, which should allow for partial or complete replacement of the composition and parameters of single instances of trading strategies, both during a single run in the strategy tester and when the final EA is running on a trading account.
Developing a multi-currency Expert Advisor (Part 22): Starting the transition to hot swapping of settings
Developing a multi-currency Expert Advisor (Part 22): Starting the transition to hot swapping of settings
  • 2025.11.07
  • www.mql5.com
If we are going to automate periodic optimization, we need to think about auto updates of the settings of the EAs already running on the trading account. This should also allow us to run the EA in the strategy tester and change its settings within a single run.