Automatically Obtaining account information under program control.

 

I want to write a program in Delphi XE5 to display on my computer screen (refreshed every 15 minutes) the account equity and account balance of my accounts with a given broker.

Suppose I have 4 accounts with FXCM.  I want to see the state of those four accounts by writing an EA to interrogate the accounts and then write the information to disc to be processed by my Delphi program.  I want one Instance of MT4 to be able to interrogate all four FXCM accounts.

The question is - how do I get the code of an EA to log on to each account in turn so as to extract the required information?

 
Nicholas Menges:

I want to write a program in Delphi XE5 to display on my computer screen (refreshed every 15 minutes) the account equity and account balance of my accounts with a given broker.

Suppose I have 4 accounts with FXCM.  I want to see the state of those four accounts by writing an EA to interrogate the accounts and then write the information to disc to be processed by my Delphi program.  I want one Instance of MT4 to be able to interrogate all four FXCM accounts.

The question is - how do I get the code of an EA to log on to each account in turn so as to extract the required information?

Unfortunately in the MQL there are no functions for changing the account, so you can try to do this by simulating menu clicks through the Win API or via the command line with the terminal reboot.
Reason: