Download MetaTrader 5
To add comments, please log in or register
Start making profit using the Market. Publish your product!
Ravadre
55
Ravadre 2013.12.18 17:12 

Hi,

  I encountered a problem with new, updated MQL4. Both timers (millisecond and second one) work fine when I start EAs after the terminal is started (by d&d them on charts).

However, when the EA is loaded with the platform start (for example, when I close the terminal with EAs running and then open it again), all Timer functions return false and they won't work. I can't even get them to work by re-trying then in OnTick() function, the only way I can fix this is to manually remove EA from a chart and put it there again, which is something I would really like to avoid.

 Minimal code to reproduce:

int OnInit() {
    bool timerOk = EventSetMillisecondTimer(50);
    Print("Timer started: " + timerOk);
    return(INIT_SUCCEEDED);
}

void OnDeinit(const int reason) {
    EventKillTimer();
}

void OnTimer() {
    Print("T");
}

 Will print 'Timer started: false', if and only if the EA was on a chart when the terminal started.

 Is this known issue, can this be circumvented somehow?

 Regards,

 Ravadre 

Alain Verleyen
Moderator
29551
Alain Verleyen 2013.12.18 17:16  

Is this happens on MT5 too ?

If it's only with the beta MT4, then please report it on ServiceDesk and/or eventually in related topic on mql4.com forum.

Beta MetaTrader 4 Build 555 with Updated MQL4 Language and Market of Applications Released - MQL4 forum
  • www.mql5.com
Beta MetaTrader 4 Build 555 with Updated MQL4 Language and Market of Applications Released - MQL4 forum
Ravadre
55
Ravadre 2013.12.18 17:39  
angevoyageur:

Is this happens on MT5 too ?

If it's only with the beta MT4, then please report it on ServiceDesk and/or eventually in related topic on mql4.com forum.

It is MT4 beta specific (just checked). I posted it on this forum, as I was hoping that someone had this issue before (or maybe that it was present in mt5 - it's not though). I will report this on appropriate forums.

Thank you for hints.

Simon Gniadkowski
Moderator
17975
Simon Gniadkowski 2013.12.18 17:47  
Ravadre:

It is MT4 beta specific (just checked). I posted it on this forum, as I was hoping that someone had this issue before (or maybe that it was present in mt5 - it's not though). I will report this on appropriate forums.

Thank you for hints.

Please post it to the appropriate open thread . . . don't create a new thread.
/
To add comments, please log in or register