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!!
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.
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.
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
You havent proven anything why are you using isOptimzed in that piece of code? did you check the
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
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.