Join our fan page
Developing a multi-currency Expert Advisor — source codes from a series of articles - library for MetaTrader 5
- Views:
- 2710
- Rating:
- Published:
- 2024.02.25 14:09
- Updated:
- 2024.03.02 10:42
- Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This series of articles is in the process of being written. As we move forward, source codes from new articles will be added to this library.
It is recommended to review the code in the order of publication of articles in order to better monitor the development and changes made.
At this stage, the general scheme of the library looks like this:
An example of the test results for Expert Advisor from the article (Part 3):
A list of published articles with a detailed explanation of the development process:
- Developing a multi-currency Advisor (Part 1): Collaboration of several trading strategies
There are quite a few different trading strategies. From the point of view of risk diversification and increasing the sustainability of trading results, it may be useful to use several parallel strategies. But if each strategy is implemented as a separate adviser, then it becomes much more difficult to manage their joint work on one trading account. To solve this problem, it is advisable to implement the work of different trading strategies in one Expert Advisor. - Developing a multi-currency Expert Advisor (Part 2): Transition to virtual positions of trading strategies
We will continue to develop a multi-currency advisor with several parallel strategies. Let's try to transfer all the work related to opening market positions from the strategy level to the level of an expert managing strategies. The strategies themselves will only trade virtually, without opening market positions. - Developing a multi-currency Advisor (Part 3): Architecture revision
We have already made some progress in developing a multi-currency advisor with several parallel strategies. Taking into account the accumulated experience, we will review the architecture of our solution and try to improve it before we go too far ahead. - Developing a multi-currency Expert Advisor (Part 4): Pending virtual orders and saving state
Having started developing a multi-currency advisor, we have already achieved some results and managed to carry out several iterations of code improvement. However, our advisor could not work with pending orders and resume work after restarting the terminal. Let's add these features.
The full code is located in the attached archive due to the large number of files. Unzip it into the Experts folder. The files inside are divided into folders related to individual articles. Code from all parts added in archive, but at present only Part 1 and Part 2 have translated comments.
The two visible source code files are not used, they are only needed for publication.
Static class to fix the TimeGMT() function during testing in the strategy tester.
Historex: export the history of rates and ticks to CSV-filesThis is a script to export rates and ticks of current chart's symbol into CSV-files compatible with MT5's export/import format.
easydatabase
Breakout H1 TradingShort description.