is there a function to rescan servers?

 

I was checking to see if there is a mql4 function that can be used to rescan servers and/or login to a trading account?   I want to be able to automate this process of being able to

a) rescan/ping broker server at certain interval.

b) switch an account with the same or possibly different broker within the same terminal

 

 Any ideas?

 
I once found some code for this either here or by google..
 
Can you elaborate on your specific solution?  Right now I have to manually click on 'rescan server' or 'login' and then login again to refresh the account stats.
 

I don't know whether I have saved it or not because

1) It's not important for me at the moment.

2) Since b600+ you can see the server's latency and choose them manually

3) It seems that now the terminal is able to do it!