Download MetaTrader 5

New compiler at MQL4?

To add comments, please log in or register
Register as a seller and start offering your signals!
desert
191
desert 2014.04.27 16:38 

Hi

After some months away of MQL4 programming, today I have compiled a code which was working perfectly before (9 months), but now I got a compiling error.

This is the code line:

switch(Orders[index,1])

Orders is defined like this:

double
Orders[100,12];


The error is this one:

'Orders' - ilegal switch expression type


As mentioned before, this error is new, it worked ok previously, was it an update in MQL4? any help on the error?

Thanks

Alain Verleyen
Moderator
30752
Alain Verleyen 2014.04.27 17:45  
desert:

Hi

After some months away of MQL4 programming, today I have compiled a code which was working perfectly before (9 months), but now I got a compiling error.

This is the code line:

switch(Orders[index,1])

Orders is defined like this:

double
Orders[100,12];


The error is this one:

'Orders' - ilegal switch expression type


As mentioned before, this error is new, it worked ok previously, was it an update in MQL4? any help on the error?

Thanks


Switch operator works with integer only.
Keith Watford
Moderator
9644
Keith Watford 2014.04.27 17:47  
You can only use integers with switch now
desert
191
desert 2014.04.27 22:47  

Ok, I see, thanks for your answers.

I have tested this with an old metaeditor, it compiles without errors.

Could I use that expert advisor in the new Mt4 version? Any posible issue with that?


Thanks again guys.

Alain Verleyen
Moderator
30752
Alain Verleyen 2014.04.27 23:10  
desert:

Ok, I see, thanks for your answers.

I have tested this with an old metaeditor, it compiles without errors.

Could I use that expert advisor in the new Mt4 version? Any posible issue with that?


Thanks again guys.

It should work.
To add comments, please log in or register