Beta MetaTrader 4 Build 555 with Updated MQL4 Language and Market of Applications Released - page 11

Ravadre
11
Ravadre  

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


Ubzen
5300
Ubzen  
alexey_pak: Sorry for inconvenience, we haven't reply so you are not get a notification. For some reasons may be delays to answer if you want to get actual information please write again in your task. Thank you for participating.
Ok thanks. I'll just close out the open_service ticket since its resolved.
Aleksey Pak
1151
Aleksey Pak  
Ravadre:

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:

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



This issue was fixed in the build 563, please update to the last version
Ubzen
5300
Ubzen  
Ravadre: ...........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.......
alexey_pak:This issue was fixed in the build 563, please update to the last version
I just tested on Built_563 and can confirm that it works.
[Deleted]  

How can i update ver.555?

my broker is fxpro.

fxpro`s latest ver. is 509.

I tried demo.metaquotes.net:444

But It is not update.

Ubzen
5300
Ubzen  
gilmt4:

How can i update ver.555?

my broker is fxpro.

fxpro`s latest ver. is 509.

I tried demo.metaquotes.net:444

But It is not update.

The latest version is 509. Anything higher is in Testing (aka Beta).
Simon Gniadkowski
17373
Simon Gniadkowski  
gilmt4:

How can i update ver.555?

my broker is fxpro.

fxpro`s latest ver. is 509.

I tried demo.metaquotes.net:444

But It is not update.

If you continue to double post ( https://www.mql5.com/en/forum/148327/page10#882505 ) you will receive a BAN.
AutoAbacus
25
AutoAbacus  

A forward slash in code excluded by conditional compilation crashes the compiler, which goes into an infinite loop requiring the process to be killed.

I like the enhancements to MT4 a lot, thank you, and want to use conditional compilation. Forward slashes in code to be excluded by conditional compilation are hardly unusual, so I hope this gets fixed soon.

I was able to reproduce the bug via the following simple bit of code:

// #define TRADING_BOT 0
void OnInit() {
#ifdef TRADING_BOT
int bug = 1234 / 2; // The division (single forward slash) crashes the compiler if the macro TRADING_BOT is not defined
string msg = "Up/Down (Green/Red) ..."; // Single forward slashes in quoted text will also cause the crash if excluded by conditional compilation. They are ok in comments.
#endif
}

That code snippet gave the crash with builds 562 and 563 running on Windows 7.

A workaround is to remove all '/'s from within code that might be excluded by conditional compilation by:

- using a macro for division e.g. #define DIV(a, b) ((a)/(b))

- reformulating text to avoid '/'s

AutoAbacus
25
AutoAbacus  

Compilation errors or incorrect line number/character counts in error messages result when compiling source files with line endings other than the Windows CR LF one.

OK, the "fix" is easy enough - change the file to use CR LF endings - but surely it would be better (and easy) for the compiler to accept any of the normal standard line endings? Some of us who also develop for non Windows environments (e.g. php modules for Linux servers) use editors with the line ending default set to other than CR LF. Why use 2 characters when 1 will suffice?

AutoAbacus
25
AutoAbacus  
gilmt4:

How can i update ver.555?

my broker is fxpro.

fxpro`s latest ver. is 509.

I tried demo.metaquotes.net:444

But It is not update.


See www.forexfactory.com/showthread.php?p=7140333#post7140333

which gives complete instructions including screen images.

Be aware that this performs an upgrade of the install you start from, so if you want to keep your current build 509 working, you should install a second 509 copy in a different location and upgrade that.