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

 

Everything seems to be working.

I have a small wish - can't the list of functions drop-down by Alt+M be permanently visible in the "Navigator" window? It would be very convenient to navigate through the code.

 
BorisMQL4:
Is there any way to customise the Toolbar as it was previously possible?

Yes, right click on an existing toolbar item and select "Customise".


Everything is the same as in MetaEditor 4.

 
Renat:

What are the differences from the old version of MQL4:

  • The priority of logical AND/OR operations has changed. Now everything is like 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

  • Now you cannot use names of the following types: short, long, float, const, virtual, input, delete, new, do, char.

  • Now, imported dll-functions cannot accept arrays of strings as a parameter. As in MQL5

  • Now there are predefined variable names _Period, _Symbol, _LastError, _CriticalError, _StopFlag, _Point, _Digits, _UninitReason, _RandomSeed that may clash with simple variables declared in existing source code with the same names.

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

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

The first 2 items are especially dangerous because the code will compile but may not work correctly.

May I add more? If not, please correct it (no time for beta test and full test). (so I will write at the end (?) not to look like an absolute truth):

  • The strings became unicode (2 bytes). Therefore, algorithms based on manipulating 1-byte characters won't work correctly or won't work at all (?).
  • You must explicitly specify the second and higher array dimension when describing the function's parameters (?)
  • Local variables and arrays are not initialized automatically (?)
  • Default arrays are no longer static (?)
  • Strings longer than 256 characters will not be truncated (?)
  • Some constants changed their internal representation. For example, the graph periods start from H1 (?)
  • ...
Документация по MQL5: Основы языка / Переменные / Локальные переменные
Документация по MQL5: Основы языка / Переменные / Локальные переменные
  • www.mql5.com
Основы языка / Переменные / Локальные переменные - Документация по MQL5
 

List of entry points for new MQL4 programmes

1. For compatibility with existing sources, the familiar init, start, deinit remain

2. Added:

OnInit, OnDeinit (for Expert Advisors, indicators and scripts, the simultaneous existence of the functions init and OnInit, deinit and OnDeinit is not allowed)

OnStart for scripts (simultaneous existence of OnStart and start is not allowed)

OnTick for Expert Advisors (simultaneous existence of OnTick and start is not allowed)

OnCalculate for indicators (simultaneous existence of OnCalculate and start is not allowed)

Also added:

OnTimer for Expert Advisors and indicators

OnChartEvent for Expert Advisors and indicators

OnTester for Expert Advisors

 

These changes to the calculation of expressions should have been made a long time ago. Almost rarely will they cause problems, unless the author wrote huge expressions.

There is no problem with strings - internally they are Unicode, automatically converted to ANSI when used outside the terminal (sending comments in orders), including automatic recoding back and forth when passed to DLL. That is, compatibility is complete.

The dimensions of the arrays are yes. Now you can forget about wild games with multidimensional arrays, as they are perfectly replaceable by structures.

Arrays in MQL4 have never been static, on the contrary, they have always been dynamic.

No, there is no more 256 characters limit.

Документация по MQL5: Основы языка / Переменные
Документация по MQL5: Основы языка / Переменные
  • www.mql5.com
Основы языка / Переменные - Документация по MQL5
 
stringo:

List of entry points for new MQL4 programmes

1. For compatibility with existing sources, the familiar init, start, deinit remain

2. Added:

OnInit, OnDeinit (for Expert Advisors, indicators and scripts, the simultaneous existence of the functions init and OnInit, deinit and OnDeinit is not allowed)

OnStart for scripts (simultaneous existence of OnStart and start is not allowed)

OnTick for Expert Advisors (simultaneous existence of OnTick and start is not allowed)

OnCalculate for indicators (simultaneous existence of OnCalculate and start is not allowed)

Also added:

OnTimer for Expert Advisors and indicators

OnChartEvent for Expert Advisors and indicators

OnTester for Expert Advisors

Are OnTrade and OnTradeTransaction planned?
 
Renat:

Maybe the studio is Russian?

Yeah, it's Russian. Is that critical?
 
fyords:
Yes, it's Russian. Is it critical?

Not critical except for the speckled phrases in Russian. This text is deducted from the studio's responses.

We will try to solve this problem.

 
Renat:

Not critical except for speckled phrases in Russian. This text is deducted from the studio's responses.

We will try to solve this problem.

I see, thank you, and about finding the 5th studio unit the issue will be solved or is it me having some problems?
 
Urain:
Are OnTrade and OnTradeTransaction planned?
Unfortunately, no.