Hello,
I would like to write a program, preferably EA, to analyze the combined history of transactions on several accounts. The program would connect to n accounts, download transaction history, process, display and enable analysis. I stopped at the idea of how to connect from EA to several accounts (I don't think it's possible) or how to connect to the account by c++ and download histories without using the mt5 terminal (or I always have to have mt5 terminal as proxy?) , somehow websites like myfxbook manage this. Do you have any ideas on how to best approach this?
- Export from MT4 to CSV
- Is there a way to connect to a broker to get trade history and account data like MyFXBook does?
- How do I programmatically define a martingale in my account?
- MyFXBook and other websites can do it because they have most probably purchased a back-office license from MetaQuotes or they go through 3rd parties that have done so.
- You will always need the MetaTrader terminal to connect to an account. It cannot be done directly (unless you licence other solutions from MetaQuotes).
- No, an EA alone is unable to do that. Any kind of normal MQL program is unable to manage the connections to multiple accounts. It will require some external interaction (see point 4.2).
- To my knowledge, there are currently two possible options available to normal users:
- Using the MT5 Python API, you will be able to connect to multiple accounts (one at a time, not simultaneously) and process the data.
- Using command line batch file to start-up MetaTrader (with an initialisation file to connect the desired account), and then run MQL program to collect and process the data.
Thank You Fernando, it helps.
Looks like I have to run n times MetaTrader, for n accounts, „download” data with history, and then compose and calculate stats, next be possible generate output file or even simple Web to serve data to integrate with EA.
I will try with py. API beacuse in one program I can do it all.
funkykoval #: Looks like I have to run n times MetaTrader, for n accounts, „download” data with history, and then compose and calculate stats, next be possible generate output file or even simple Web to serve data to integrate with EA. I will try with py. API beacuse in one program I can do it all.
You don't need to have multiple terminals running. You only need one terminal installed.
You then have that terminal connect to a trading account, collect the data, disconnect, and then repeat the process for the next trading account.
You can do this either via the command line method (which works for both MT4 and MT5) or via the Python API method (for MT5 only).
Yes, this is what I mean :) probalby I use some „short think” Im doing, will give feedback when im done.
![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