Download MetaTrader 5

RoboForex OnTimer not firing on MT4

To add comments, please log in or register
Interested in Signals activity? Come and track!
Wayside48
527
Wayside48 2016.09.21 10:48 

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!!

Marco vd Heijden
Moderator
4707
Marco vd Heijden 2016.09.21 11:30  

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.

Wayside48
527
Wayside48 2016.09.21 13:04  
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:
Marco vd Heijden
Moderator
4707
Marco vd Heijden 2016.09.21 13:22  
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.

Wayside48
527
Wayside48 2016.09.21 13:32  
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.

Marco vd Heijden
Moderator
4707
Marco vd Heijden 2016.09.21 13:51  
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.

Wayside48
527
Wayside48 2016.09.21 14:26  
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.

Nguyen Nga
6550
Nguyen Nga 2016.09.21 16:08  

Try download lastest MT4 and try again.

i see no problem with MT4  RoboForex 

Wayside48
527
Wayside48 2016.09.21 16:41  
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?
Nguyen Nga
6550
Nguyen Nga 2016.09.21 17:30  
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?
Marco vd Heijden
Moderator
4707
Marco vd Heijden 2016.09.21 18:19  
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.

12
To add comments, please log in or register