Accounts handler. Switching between accounts (this is NOT MQL task, I already know).

 

Hi to all.

I am looking for someone who can solve this task:

I need to automatize switching between accounts (i.e.: handling login procedure) . Is there a chance to have this task smartly solved by batch, API and Dll or whatever?

Many thanks to all.

Simon (minkobliss@hotmail.it)

 

within MT4?

or outside Mt4?

outside MT4, you can start a terminal by using a start.ini file which contains the login information (check the MT4 help, tools / configuration at startup section)

within MT4, through a script, maybe some advanced calls to the Windows API to simulate the keyboard actions. but not sure if this will works.

 
willgart:

within MT4?

or outside Mt4?

outside MT4, you can start a terminal by using a start.ini file which contains the login information (check the MT4 help, tools / configuration at startup section)

within MT4, through a script, maybe some advanced calls to the Windows API to simulate the keyboard actions. but not sure if this will works.


Thank you willgart.

I need to loop 2 steps:

1) login

2) save history pool by writing a file (easy peesy)

then login to another acct.

And all this should be done for half a thousands of client accounts. Than's whay I need to automatize it.

If I grasp what you wrote my task is within MT4.

Can you help me with API?

Many Thanks.

Simon

 
SimonTrader:
I need to automatize switching between accounts (i.e.: handling login procedure)
Why not just have 2 separate installations and read the file output of the other?
 
WHRoeder:
Why not just have 2 separate installations and read the file output of the other?


Thanks WHRoeder!

So how can I arrange The One installation through which half a thousand accounts are switched one-by-one?

 

Accounts handler. Switching between accounts (this is NOT MQL task, I already know, but I CAN PAY FOR IT). <--appears your heading changed.

Seems you're willing to purchase the service of having a programmer code-it. I'll recommend the Job-Section there's allot of strong programmers there.

 
willgart:

within MT4?

or outside Mt4?

outside MT4, you can start a terminal by using a start.ini file which contains the login information (check the MT4 help, tools / configuration at startup section)

within MT4, through a script, maybe some advanced calls to the Windows API to simulate the keyboard actions. but not sure if this will works.


Dear willgart,

The .ini thing.

What I think is to launch first a MT4 instance in order to have the start.ini file written by script1 (in accordance to the cycle structure: login->script2 call->login...). Then a second MT4 instance will be launched via batch in order to execute that .ini file so to - in sequence - log in to xxxxx acct call script2 log in to xxyxy acct....

I am experiencing some difficulties with writing the .ini. When I code it to login in to 1 account and run the script it works very well. But I find hard to make it login to 1234, then wait, then call script2, then wait, then login to 1345, then wait....

Can you help me with this?

Thanks.

Simon

 
WHRoeder:
Why not just have 2 separate installations and read the file output of the other?

Dear WHRoeder,

I am trying your suggestion.

I am experiencing some difficulties with the .ini, maybe trivial. When I code it to login in to 1 account and run the script it works very well. It does not work when I try to make it login to 1234, then wait, then call script2, then wait, then login to 1345, then wait....

Can you help me with this?

Thanks.

Simon

 
I suggested 2 separate installations. One logs in to one account. The other logs in to the other. You are trying to have one installation switch.
 
WHRoeder:
I suggested 2 separate installations. One logs in to one account. The other logs in to the other. You are trying to have one installation switch.

Ok, but what if I have 500 accounts to switch through one-by-one?
 

I read this topic the other day and I actually have the software you looking for - sort of, and I see that you post a job for it - not interested. I created a software that control MetaTrader 4 Multi terminal ( https://www.metatrader4.com//) for trading multiple accounts and the software you looking for is a part of it. That's why I said sort of.

How it works is very simple actually, I'm not saying it's impossible, but it's better be done by separate executable not from ex4.

First get the handle of MT, and then get the handle of MT menu login (Menu : File, Login) to open login window. After login window is opened, get the handle of it as well as the handle of all necessary field (login, password, server, login button, etc...). I count there's at least 9 of them. Then you can do whatever you want from it. To get all these handles, you have to know it's class name. For example the class name of MT 4 is MetaQuotes::MetaTrader::4.00 and the class name for multiterminal is MetaQuotes::MTMultiTerminal::4.00, class name for login window is #32770, status bar is msctls_statusbar32, button is Button, Drop down box (like that in account and server field) is Combo and edit is Edit, and me is on high class . Now get this : the handle of this login window (and all necessary field) is change every time it's opened, but not it's class names. And the reason why you should use all these handles is that you should not use simulated keystroke or mouse click, which is ridiculous way of controlling other software.

Since server list is not provided (or there may be error in login number or password), in my case, the software will try to login using all the server from server list found in login window and will re-write the list. So it's not a problem having bad list. However, since you have 500 accounts login w/o server name and say if there are 5 servers in login window, you should try at least 500 logins. Having me about at least 30 seconds to find out if login is successful, at least it will require 4 to 20 hours of jobs just to login. Whoa, you do need a reliable one, there's a reason not using .ex4.

Just FYI, if I'm interested, I will have and must re-write the soft and probably won't give the source code - coz it's part of controlling MT4 multiterminal.

But I think you should do it on your own. I already show you how and you shouldn't pay for these stuff. And even when you willing to pay, you should pay higher than that - I mean, come on - for 500 accounts !?!. You can start at least from user32.mqh and that MT4 class names I gave you and this MSDN site and this MSDN site and Google advance search for user32.dll on mql4.com, and since it looks like you understand mql4, it's not bad idea to only experiment these with mql4 . And don't forget to clicks any links on left side of MSDN site.

Below is the old version of mine

Have fun :)

Reason: