Improve communications

 
Hi, I have developed a EAs and after testing with the Tester that provides MetaTrader 4, I'm starting testing it with a demo on line account.

The problem that I'm facing right now is that MetaTrader has many problems connecting to servers during time.

i.e.: during the first hours everything seems to work OK, but after 3-4 hours the connection to server became red or it is so slowly that no trade is generating. If I close and reopen MetaTrader trading starts again properly (so, my internet connection is not the problem).

What can I do to solve this situation? Are there any way to restart the connection with coding inside the EAs?

Thanks!
 
brugiafreddo:
Hi, I have developed a EAs and after testing with the Tester that provides MetaTrader 4, I'm starting testing it with a demo on line account.

The problem that I'm facing right now is that MetaTrader has many problems connecting to servers during time.

i.e.: during the first hours everything seems to work OK, but after 3-4 hours the connection to server became red or it is so slowly that no trade is generating. If I close and reopen MetaTrader trading starts again properly (so, my internet connection is not the problem).

What can I do to solve this situation? Are there any way to restart the connection with coding inside the EAs?

Thanks!

Check/verify the following:

  • System resources - are u reaching some kind of limit? Memory?
  • Ping your broker - ~100ms or less is acceptable.
  • Check your Journal's log - are there any errors?
 
brugiafreddo wrote >>
Hi, I have developed a EAs and after testing with the Tester that provides MetaTrader 4, I'm starting testing it with a demo on line account.

The problem that I'm facing right now is that MetaTrader has many problems connecting to servers during time.

i.e.: during the first hours everything seems to work OK, but after 3-4 hours the connection to server became red or it is so slowly that no trade is generating. If I close and reopen MetaTrader trading starts again properly (so, my internet connection is not the problem).

What can I do to solve this situation? Are there any way to restart the connection with coding inside the EAs?

Thanks!


Look you Code good and look again, also the indicators, if you have included some customs ...maybe you read anc create some files and they become bigger and bigger..
Maybe you come to some endlees loop and all your resources are gone.
PC - No Resources - Slow Connection - Now Connection
 
Memory or CPU is not the problem...

Any others ideas?

I have the same EA's running for 3 pairs or currencies...but I have also tried with 1 and same result.

It looks like MetaTrader loss eficciency in time.

Thanks!
 
I've faced these problems before. My EA fired more trades when I was using the PC. Therefore, I set my windows/machine not to use screen savers or power management which may slow CPU, sleep processes or slow down network connections.
I use manual power management: when I want to save power, I switch off the monitor. :-)
 

Everyday and randomly throughout the day, broker servers do go under maintenance and synchronization or something like that.
Broker servers can put your connection on hold.

Ain't that something new?