i might add that i run my other main EA on 7 pairs and its about 2k lines of code, so its prety heavy.. might it be that memory is full or something? computer is running fine and i get no errror messages.. please help, i have tryed to make the login EA run OnTimer event and same problem occours
Failures probably are due to misalignment, asynchronous processes run login and logout.
For work, try the following:
1. Leave at EA only one broker, for a second, you can run another EA.
2. Combine the login and logout in the same function with an exposure time-out in a loop while (LogTime> TimeCurrent ()).
3. Also, the main program block, it is better not to perform ticks, and in an infinite loop, for example while (! IsStopped ()).
Best regards Philipp
Failures probably are due to misalignment, asynchronous processes run login and logout.
For work, try the following:
1. Leave at EA only one broker, for a second, you can run another EA.
2. Combine the login and logout in the same function with an exposure time-out in a loop while (LogTime> TimeCurrent ()).
3. Also, the main program block, it is better not to perform ticks, and in an infinite loop, for example while (! IsStopped ()).
Best regards Philipp
thx for the tip, but unfotunelty i dont know what you mean by this..
how do you mean by ut login and logout command on same function? i have tryed with sleep for 5 sec between logoin and logout but i dont get it to work..
the chrome plugin i cant change cause i ddidnt make it and dont have the source.
could you please give examples with what you mean?
i have tryed my login EA to work with OnTimer event but same happends there, it runs good for 10 hours and then it suddenly wont preform the login commands...
thx for the tip, but unfotunelty i dont know what you mean by this..
how do you mean by ut login and logout command on same function? i have tryed with sleep for 5 sec between logoin and logout but i dont get it to work..
the chrome plugin i cant change cause i ddidnt make it and dont have the source.
could you please give examples with what you mean?
i have tryed my login EA to work with OnTimer event but same happends there, it runs good for 10 hours and then it suddenly wont preform the login commands...
bool relogin() { if(!logout(broker1url)) return(false); datetime time = (usetimelocal?TimeLocal():TimeCurrent()); while(((usetimelocal?TimeLocal():TimeCurrent()) - time) < (refresh * 60) && !IsStopped()) Comment("REFRESHING"); Comment(""); while(!login(broker1url,broker1log,broker1pass) && !IsStopped()) Comment("Error to login! " + __FUNCTION__); return(true); } int start() { datetime time1, time2; while(!IsStopped()) { time1 = (usetimelocal?TimeLocal():TimeCurrent()); if(time1 < StrToTime(online) || time1 > StrToTime(offline) || TimeDay(time1) == SUNDAY) continue; if(login(broker1url,broker1log,broker1pass)) { time1 = (usetimelocal?TimeLocal():TimeCurrent()); while(time1 < StrToTime(offline) && !IsStopped()) { time2 = (usetimelocal?TimeLocal():TimeCurrent()); if((time2 - time1) >= (relog * 60)) { if(!relogin()) Comment("Error to relogin!"); time1 = (usetimelocal?TimeLocal():TimeCurrent()); } } while(!logout(broker1url) && !IsStopped()) Comment("Error to logout!"); } else Comment("Error to login!"); } }

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have a strage problem.
I have written a EA that is running two timers and when they are at zero they run a file write function that my Chrome Extenssion reads and preforms the login/logut.
It is working fine , but only for a couple of hours and then after lets say sex-seven hours it stops working.. When it stops working, my EA is still running and i have no error messages, but it doent run the filewrite command. Now, when this happends i have also the filewrite command in a script and when i run it it works.. for the EA to work again i need to reload the EA.
this is my include file that my EA and script it calling the filewrite function for
and this is my login timer EA..