RoboForex OnTimer not firing on MT4

 

I have an EA which uses the OnTimer event and works just fine on my accounts with two brokers.  However, I have just opened a RoboForex account, and the same EA is not working because the OnTimer event handler is not being hit (added debug code proves it).  Has anyone else had this problem or is it just me?  I find it difficult to believe that RoboForex are deploying a partially functional version of MQL4, but I find it equally difficult to understand why it is not working on that broker only!

I have contacted RoboForex on the subject but the respondent clearly didn't understand the question, and couldn't be bothered to find someone who did - completely useless!!

 

Not possible.

OnTimer() is initialized in OnInit() function and after that the Timer() function runs locally.

Not on the broker server or anywhere else.

It must be something else.

Please post the code.

 
Marco vd Heijden:

Not possible.

OnTimer() is initialized in OnInit() function and after that the Timer() function runs locally.

Not on the broker server or anywhere else.

It must be something else.

Please post the code.

I would normally agree with you entirely, but this is not my experience.  Enclosed is a zip file with a test EA in its simplest form together with the resultant log files from one of my accounts (on which the full EA works fine) and from my RoboForex account.  You will note that in the former case there are log records every 60 seconds, whereas in the RoboForex case, although there are over 7 minutes between initialisation and de-init, there are no OnTimer records!!!
Files:
 
Wayside48:
I would normally agree with you entirely, but this is not my experience.  Enclosed is a zip file with a test EA in its simplest form together with the resultant log files from one of my accounts (on which the full EA works fine) and from my RoboForex account.  You will note that in the former case there are log records every 60 seconds, whereas in the RoboForex case, although there are over 7 minutes between initialisation and de-init, there are no OnTimer records!!!

You ea gets deinitialized which kills the timer.

This is also a local event just like the other 2.

 
Marco vd Heijden:

You ea gets deinitialized which kills the timer.

This is also a local event just like the other 2.

Yes, it gets deinitialised when I remove it from the chart - it should still have recorded 7 one minute events between being initialised and deinitialised.  If you look at the code, I am recording the time of initialisation, the time of de-initialisation, and the time of every OnTimer event between.  In the working case the one minute OnTimer events are correctly recorded, on the RoboForex log there are NO OnTimer events recorded between initialisation and de-initialisation 7 minutes later.

 
Wayside48:

Yes, it gets deinitialised when I remove it from the chart - it should still have recorded 7 one minute events between being initialised and deinitialised.  If you look at the code, I am recording the time of initialisation, the time of de-initialisation, and the time of every OnTimer event between.  In the working case the one minute OnTimer events are correctly recorded, on the RoboForex log there are NO OnTimer events recorded between initialisation and de-initialisation 7 minutes later.

OnTImer() function does not work in the tester.

 
Marco vd Heijden:

OnTImer() function does not work in the tester.

Sorry to be blunt, I know you are trying to help but... 

I am NOT using it in the tester, and I never said I was!!!

I have given you two log files generated by the sample EA I sent.  Both were from the EA running on LIVE accounts in LIVE conditions.  One is reporting OnTimer events every minute, the other (RoboForex) is NOT - it is the SAME EA running on two different LIVE accounts in REAL TIME.

You started off by saying "Not Possible", but I would suggest that I have proved that the RoboForex terminal is somehow not generating OnTimer events - which is where I started.

I can't explain it which is why I sought help from the Forum, but it seems that is of no help either!  Thanks anyway, if I find an answer I'll post it here.

 

Try download lastest MT4 and try again.

i see no problem with MT4  RoboForex 

 
Nguyen Nga:

Try download lastest MT4 and try again.

i see no problem with MT4  RoboForex 

I'm using build 1010 (18th August) downloaded a couple of days ago.  When you say "I see no problem with MT4 RoboForex", are you using the OnTimer event?
 
Wayside48:
I'm using build 1010 (18th August) downloaded a couple of days ago.  When you say "I see no problem with MT4 RoboForex", are you using the OnTimer event?
 
Wayside48:

Sorry to be blunt, I know you are trying to help but... 

I am NOT using it in the tester, and I never said I was!!!

I have given you two log files generated by the sample EA I sent.  Both were from the EA running on LIVE accounts in LIVE conditions.  One is reporting OnTimer events every minute, the other (RoboForex) is NOT - it is the SAME EA running on two different LIVE accounts in REAL TIME.

You started off by saying "Not Possible", but I would suggest that I have proved that the RoboForex terminal is somehow not generating OnTimer events - which is where I started.

I can't explain it which is why I sought help from the Forum, but it seems that is of no help either!  Thanks anyway, if I find an answer I'll post it here.

You havent proven anything why are you using isOptimzed in that piece of code? did you check the 

   bool EATradeAllowed=AccountInfoInteger(ACCOUNT_TRADE_EXPERT); 

I stick to my first answers timer function runs locally and is not affected by broker, even in weekends when markets are closed i use ontimer to have the ea run calculations to find next week entries.

I also have ea's where the ontimer generates arteficial ticks those also live without a live market feed.

if you do not find a solution and believe it to be a bug then please write to servicedesk.

Also you should take a simpler route to test things there are too many things in between dropping a simple

PlaySound("alert.wav");

In the timer function should be a more direct approach to check if the timer runs, in stead of writing to files and all that.

Reason: