Developing Multicurrency Expert Advisor - source codes from the article series
Info
The Developing Multicurrency Expert Advisor - source codes from the article series is a Library for MetaTrader 5 that this series of articles is in the process of being written. As it progresses, source code from new articles will be added to this library.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Library works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Libraries folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Developing Multicurrency Expert Advisor - source codes from the article series
1. Storage: Place library files in the MQL/Libraries directory to ensure they are accessible to your projects.
2. Implementation: Include the library in your code using the #import directive, ensuring you match the exact function names and parameters.
3. Compilation: Ensure the library is present in the directory before you compile your main EA or script, as the compiler links them during this phase.
4. Management: Keep libraries organized in sub-folders if you manage many custom functions to maintain a clean project structure.
Frequently Asked Questions
Q: What is a library file used for? A: Libraries store reusable code modules, allowing you to centralize common logic used by multiple EAs or indicators.
Q: Is a library executable? A: No, libraries are non-executable files containing functions; they must be imported into an EA, indicator, or script to function.
Q: Can I update a library while the platform is running? A: You should compile your EA or script after updating a library to ensure the latest code changes are integrated.
What this tool does
This series of articles is in the process of being written.
Typical Use Case
This Library excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Library works on MetaTrader 5. Place the file in the MQL5/Libraries folder and restart the terminal.
Description & Settings
Related: Fuzzy - library for developing fuzzy models - another powerful library for MetaTrader 5 traders.
This series of articles is in the process of being written. As it progresses, source code from new articles will be added to this library.
Also recommended: Developing a multi-currency Expert Advisor — source codes from a series of articles - similar library with strong performance on MetaTrader 5.
It is recommended that you review the code in the order in which the articles are released to better track the development and changes made.At this stage, the general layout of the library looks like this:
Example of test results from an article:
List of published articles with a detailed explanation of the development process:
. There are quite a lot of different trading strategies. From the point of view of risk diversification and increasing the stability of trading results, it can be useful to use several strategies working in parallel. But if each strategy is implemented as a separate Expert Advisor, it becomes much more difficult to manage their joint work on one trading account. To solve this problem, it is desirable to implement the work of different trading strategies in one Expert Advisor..
Let's continue the development of a multicurrency Expert Advisor with several strategies working in parallel. Let's try to transfer all the work related to opening market positions from the level of strategies to the level of the Expert Advisor that manages strategies. The strategies themselves will trade only virtually, without opening market positions..
We have already made some progress in developing a multicurrency Expert Advisor with several strategies working in parallel. Taking into account our experience we will revise the architecture of our solution and try to improve it before we go too far ahead..
Having started developing a multicurrency Expert Advisor, we have already achieved some results and managed to make several iterations of code improvements. However, our Expert Advisor could not work with pending orders and resume work after restarting the terminal. Let's add these features.
In previous parts, the Expert Advisor being developed had the ability to use only a fixed position size for trading. This is acceptable for testing, but undesirable when trading on a live account. Let's make it possible to trade with variable position size..
Developing a multicurrency Expert Advisor (Part 6): Automate the selection of a group of instances (in process) After optimising a trading strategy, we get sets of parameters based on which we can create several instances of trading strategies combined in one Expert Advisor. We used to do it manually, but now we will try to automate this process.
Developing a multicurrency Expert Advisor (Part 7): Selecting a group with the forward period taken into account (in plans) 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 organised into folders related to individual articles. The two visible source code files are not used, they are only needed for publishing.
You may also like: Balance Reset - excellent alternative for library users on MetaTrader 5.
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.