![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
EA:
Indicator:
Forum on trading, automated trading systems and testing trading strategies
Buying or Selling all 7 pairs
Sergey Golubev, 2024.06.14 12:44
Developing a multi-currency Expert Advisor (Part 3): Architecture revision
In the previous articles, we started developing a multi-currency EA that works simultaneously with various trading strategies. The solution provided in the second article is already significantly different from the one presented in the first one. This indicates that we are still in search of the best options.
Let's try to look at the developed system as a whole, abstracting from the small details of the implementation, in order to understand ways to improve it. To do this, let us trace the albeit short, but still noticeable evolution of the system.
Forum on trading, automated trading systems and testing trading strategies
Buying or Selling all 7 pairs
Sergey Golubev, 2024.06.28 07:36
Developing a multi-currency Expert Advisor (Part 4): Pending virtual orders and saving status
In the previous article, we have significantly revised the code architecture to build a multi-currency EA with several parallel working strategies. Trying to achieve simplicity and clarity, we have so far only considered a certain minimum set of functionality. Even considering the limitations of our task, we have significantly altered the code from the previous articles.
Now hopefully we have the groundwork that is sufficient enough to increase functionality without radical changes to the already written code. We will try to make a minimum number of edits only where it is really necessary.
Forum on trading, automated trading systems and testing trading strategies
Buying or Selling all 7 pairs
Sergey Golubev, 2024.07.31 17:09
Developing a multi-currency Expert Advisor (Part 5): Variable position sizes
In the previous part, we dded the ability to restore the EA's state after a restart. It does not matter what the reason was - rebooting the terminal, changing the timeframe on the chart with the EA, launching a more recent version of the EA - in all cases, restoring the state allowed the EA not to start working from scratch and not to lose already open positions, but to continue handling them.
However, the size of the opened positions remained the same for each instance of the strategy throughout the entire testing period. Their size was set at the EA launch. If, as a result of the EA's operation, the trading account balance increased, then this would allow the use of an increased position size without increasing risk. It would be reasonable to take advantage of this, so let’s start implementing the use of variable position sizes.
Forum on trading, automated trading systems and testing trading strategies
How to Start with Metatrader 5
Sergey Golubev, 2024.08.10 10:59
Developing a multi-currency Expert Advisor (Part 6): Automating the selection of an instance group
Forum on trading, automated trading systems and testing trading strategies
How to Start with Metatrader 5
Sergey Golubev, 2024.08.24 11:27
Developing a multi-currency Expert Advisor (Part 7): Selecting a group based on forward period
Forum on trading, automated trading systems and testing trading strategies
How to Start with Metatrader 5
Sergey Golubev, 2024.08.31 09:20
Developing a multi-currency Expert Advisor (Part 8): Load testing and handling a new bar
In the first article, we have developed an EA featuring two instances of trading strategies. In the second one, we have already used nine instances, while in the last one this number jumped to 32. There were no problems with testing time. It is clear that the shorter the time of a single test pass, the better. But if the overall optimization takes about a few hours, this is still better than several days or weeks. Likewise, if we have combined several strategy instances in one EA and want to see its results, then a single pass should be completed in seconds or minutes, not hours or days.
Let's try to find out how the time of a single pass in the tester depends on the number of instances of trading strategies for testing periods of different durations. Let's also look at the memory consumed. Of course, we need to see how EAs behave with different numbers of trading strategy instances when launched on the terminal chart.