Beta version of MetaTrader 4 IDE including new MQL4 compiler and editor

 

Start of topic:

Below is the beta version of the IDE, the same for MetaTrader 4/MQL4 and MetaTrader 5/MQL5. This is a preview version for public review.

What are the differences from the old version of MQL4?

  • The priority of logical AND/OR operations has been changed. Now everything is as in classic C/C++.

  • A shortened evaluation of logical expressions has been introduced. Now, when evaluating a logical expression, the remaining subexpressions are not evaluated. As in C/C++.

  • The switch operator now uses only integer values. Previously, you could use real ones.

  • Now, you cannot use a full stop in variable names. Also, you cannot use the '@', '$', '?' characters in variable names.

  • The requirements to the start function have been tightened. Previously, you could specify parameters in the start function. Now all the entry points init, start, deinit, OnInit, OnStart, OnTick, OnTimer, etc. must exactly match their signatures

  • Due to the expansion of the keyword set, we cannot use names like short, long, float, const, virtual, input, delete, new, do, char.

  • Now imported dll-functions cannot take string arrays as a parameter. As in MQL5

  • Now appeared the predefined variable names _Period, _Symbol, _LastError, _CriticalError, _StopFlag, _Point, _Digits, _UninitReason, _RandomSeed that can clash with simple variables declared in existing sources with the same names

  • The datetime type has become 8 bytes like in MQL5.

The differences are not fatal and may be easily fixed in the code. In exchange, we have a lot of MQL5 features available, as well as the speed of execution and much tighter quality control.


We are planning to run public testing throughout the next month to collect as much feedback as possible and to prepare developers.

Discussion on the MQL5 forum: https://www.mql5.com/ru/forum/13651

Files:
 

This has stressed me out the most:

Renat:

Now imported dll functions can't accept string arrays as a parameter. As in MQL5

Why is it impossible to maintain compatibility? Do you need to rewrite it again? Do the MQL4 string arrays remain? If they remain, it is unclear how you prohibited it and why?
 
It is only a question of transferring to a DLL.
 
Renat:

Discussion on the MQL4 forum: https://www.mql5.com/ru/forum/13651

:)
 
Can we really make the MT4 forum like a section of the MT5 forum ?
 
Previously, when compiling, there were no warnings if the names of global and local variables coincided, but now it gives out - "declaration of 'dist' hides global declaration at line 63", also this warning gives out when the names of formal function parameters and global variable names coincide. Is it critical and can it affect the behavior of the program? Or it is purely stylistically incorrect, for example, so that there is no confusion in complex projects? (I'm already used to keeping variable scopes in mind and I often call variables similar in purpose with the same name)
 
zenz:
... Is this critical and could affect the behaviour of the programme...?
The behaviour of the program will not change, if there was a misuse of a variable in 4ka, it will remain in the new compiler.
 
Compiled the file in the new editor and slipped it to MT4.509 - it deleted it... :(
 
TarasBY:
I compiled the file with the new editor and slipped it to MT4.509 - it deleted it... :(

This is logical, as the old terminal knows nothing about the new language format.

So far, we have only released an editor and compiler for preliminary testing. In a couple of weeks we will release a beta version of the new terminal that can work with the new program format.

I recommend to read the links in the original post - they practically cover everything.

 
Renat:

This is logical, as the old terminal knows nothing about the new language format.

So far, we have only released an editor and compiler for preliminary testing. In a couple of weeks, we will release a beta version of the new terminal that can work with the new program format.

I recommend reading the links in the original post - they cover almost everything.


I haven't looked at it yet, but it would be better to make a tester like MT5, with quotes :), and it wouldn't hurt to attach a tester to processor resources.
 
M2012K:

I haven't watched it yet, but it would be better if they made a tester like MT5, with quotes :), and it wouldn't hurt to attach a tester to processor resources.


Remember the cartoon "Porridge from the axe"? ;)))

Reason: