a program for analyzing the combined history of transactions on several accounts

 
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?
 
  1. 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.
  2. You will always need the MetaTrader terminal to connect to an account. It cannot be done directly (unless you licence other solutions from MetaQuotes).
  3. 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).
  4. To my knowledge, there are currently two possible options available to normal users:
    1. Using the MT5 Python API, you will be able to connect to multiple accounts (one at a time, not simultaneously) and process the data.
    2. 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.