Beta version of MetaTrader 4 IDE including new MQL4 compiler and editor - page 24
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Can you tell me how GetLastError() will work, will _LastError be reset or will ResetLastError() have to be added?
GetLastError(), for compatibility with old MQL4 source code, will work exactly as described in the MQL4 documentation. That is, a call of GetLastError() will zeroize the value of _LastError variable and an additional call of ResetLastError() will not be required.
In its turn, in programs written in MQL5, for reasons of compatibility with MQL4, it's better to use calling the _LastError variable instead of the GetLastError() function.
I wrote a script in MQL4 in the new editor and it compiled without errors. For the sake of experiment, I replaced the int type variable with a long one and it compiled without errors. Maybe I've missed something, but I've read that the new editor has only made datetime an eight-byte string. Or maybe all variable types existing in MQL5 are now also present in MQL4?
Try to compile by adding
#property strict
Try compiling with the addition of
I wrote a script in the new editor for MQL4 and it compiled without errors. I have replaced a variable of int type with a long one for the sake of experiment. Maybe I've missed something, but I've read that the new editor has only made datetime an eight-byte string. Or maybe all variable types present in MQL5 are now also present in MQL4?
Take a look at the original post on the links:
Full replacement of MQL4 and MetaEditor 4 by common MQL5 and MetaEditor components
Instead of working on MQL4 -> MQL5 compatibility, we decided to do the opposite. We transferred all MQL5 functions and features to MQL5, preserving all MQL4 features. This means that all the powerful features of MQL5, including OOP and compiler in native code, will be available in MQL4.
To do this, we have developed a single compiler that automatically supports both MQL4 and MQL5. MetaEditor also becomes unified for both MetaTrader 4 and MetaTrader 5. With it you can compile both MQL4 and MQL5 from any version.
Renat
We have transferred the maximum functions and features of the MQL5 language... That is, all the powerful features of MQL5
I'd like to be more specific, preferably "Please give me the whole list!"