The future of MQL5 is MQL5+ or even MQL6 - page 10

 
I would like to see goto, you could simplify the code considerably, not to mention readability. after all, a loop with a condition is essentially a premature exit from the loop as well.
 
dimka8:
I would like to see goto, you could simplify the code considerably, not to mention readability. in fact, a loop with a condition is also a premature exit from the loop.
No, I don't want to :)
 
dimka8:
I would like to see goto, you can simplify the code considerably, not to mention readability. in fact, a loop with a condition is also a premature exit from the loop.

Where do you come from...

 

A word or two:

Mandatory cross-platforming ....

 
Vasiliy Sokolov:

Where do you come from...

from BASIC
 
Alexander Bereznyak:
from BASIC.

even simpler Hiasm.

what about the classics?

for(...) {
for (...) {
while (...) {
if (...) goto stop;
...
}
}
}
printf("error in program\n");
 

It would be great to introduce the concept of a project. With the adoption of OOP, all the programs now consist of several files. It is inconvenient to constantly go to the tab with the main file before compiling, if you edit a plugin. Or a crutch: introduce a programmable button Compile, to which you can bind the master file of the project you are working with.

EMPTY_VALUE may be extended to all types which allow it (int, double, string etc). It's a small thing, but it can be used in many places and you don't have to make up your own.

In the tester, make a crosshair tool like in MT.

Surely you can invent the variant with overlaying of several indicators in one indicator window under the price chart.


Comfort is built out of small details. Developers do not really want to accept this idea, and they are constantly globalizing something. Maybe we should stop sometimes, and spend time on small fixes - user comfort? ))))))

Examples: In order to measure something on a graph three times, you must click three times on the crosshair button (or press a key combination). Indicator windows in ME under the chart can not be swapped: all indicators must be removed, then they must be set in the right order. Again, to set several indicators, it is necessary to get into menu - menu - select indicator several times. And for some reason there is a tool List of indicators, which does not simplify this case and does not give anything new.... I think everyone will give such examples in MQL, in ME, in MT, in the tester without thinking.... Hell! A lot of fuss! For all the clarity and simplicity of the package, it's very uncomfortable, underdeveloped.

https://www.mql5.com/ru/docs/basis/types/integer/enumeration is the help article on transfers. It's clear what they are and what they look like... But how to use it and what's the advantage? Give me a simple example if you're too lazy to write it in words.

I think if you really want to improve something, you should establish contact with regular groups of users who actively use the package in different directions (programming, manual trading, testing, etc.) and collect reasonable suggestions from them to improve what you have, rather than asking in a crowd where everyone will want everything. Otherwise, everything will remain in letters.

Документация по MQL5: Основы языка / Типы данных / Целые типы / Перечисления
Документация по MQL5: Основы языка / Типы данных / Целые типы / Перечисления
  • www.mql5.com
Основы языка / Типы данных / Целые типы / Перечисления - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 

On the debugger:

For example, there is an expression of the form

(int)(MathFloor((ticks_stored-1)/ticks_in_candle)-MathFloor(i/ticks_in_candle));

in the current debugging implementation, the result from calculating the expression in the debugger will be available if you do

CandleNumber=(int)(MathFloor((ticks_stored-1)/ticks_in_candle)-MathFloor(i/ticks_in_candle));

and add variable CandleNumber to observation list via Shift+F9

If I want to get a result from calculation of a part of the expression, for example MathFloor(i/ticks_in_candle), I add this expression to the watch list

I get an Expression could not be evaluated.

Perhaps I'm doing something wrong, share your experience, but the point is that in debugging I cannot see not only declared variables values but also results of calculation of arbitrary expressions (of course, I am speaking about those expressions where all variables at the current moment of observation are already initialized).

Besides, I want to see information on arrays in debugging. For example, we have UpTick[] array and only one array element is available for monitoring at the moment.

Why not implement possibility to add an array to supervision with opening of a separate modal window where all elements with their indices are available:

index type value

0 int 1

1 int 2 etc.

If the array is large and requires a lot of memory - limit sampling.

And in general as a result - to realize wider functionality of the debugger in terms of possibility to monitor arbitrary expressions, variables, arrays.

 
agvozdezkiy:
ExtendEMPTY_VALUE to all types that allow it (int, double, string, etc.). It's a small thing, but it can be used in many places and you don't have to invent your own.

Everyone has already invented it. Use NULL constant.

In the tester, create a crosshair tool, like in MT.

Examples: In order to measure something on the graph three times, you need to click three times on the crosshair button (or press a key combination).

Let me tell you a secret - it's already implemented. You need to click the mouse wheel and it will be a crosshair.

You can probably come up with an option of overlaying several indicators in one indicator window under the price chart.

It has been possible to do this for a long time. You drag the indicator from the navigator to the window with the already attached indicator.

Indicator windows in ME under the chart cannot be swapped: all indicators must be removed, then you set them in the right order.

IMHO, it is not the most useful thing.

You have to go to menu - menu - select indicator several times to set several indicators. Moreover, there is a tool List of indicators for some reason, which does not simplify and does not give anything new in this case....

There is a navigator, favorites, templates and profiles. Everything can be set up. Read the help on the terminal, you will discover many new things!

https://www.mql5.com/ru/docs/basis/types/integer/enumeration - Help article about transfers. It's clear what they are and what they look like... But how to use them and what is the advantage? Give a simple example, if you're too lazy to write in words.

Enumerations are used to make code more readable and to remove constants and replace them with entities which are familiar to humans.

For example, values of enumeration ENUM_DAY_OF_WEEK can be used for comparison with value day_of_week of structure MqlDateTime. I.e. you can write it like this

        MqlDateTime dt;
        TimeCurrent( dt );
        if( dt.day_of_week == 0 )
           {
            // Что-то делаем в воскресенье
           }

Or you can write it differently:

        MqlDateTime dt;
        TimeCurrent( dt );
        if( dt.day_of_week == SUNDAY )
           {
            // Что-то делаем в воскресенье
           }

SUNDAY is a named constant of int type with value 0.

How do you think it would be clearer to a person reading the code?
Документация по MQL5: Основы языка / Типы данных / Целые типы / Перечисления
Документация по MQL5: Основы языка / Типы данных / Целые типы / Перечисления
  • www.mql5.com
Основы языка / Типы данных / Целые типы / Перечисления - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Alexey Kozitsyn:

Lists are used to make code more readable

There is another infinitely useful application. For example:

enum ENUM_OPEN_DIRECTION {
     OPEN_BUY,       // только Buy
     OPEN_SELL,      // только Sell
     OPEN_BOTH,      // Buy + Sell
     OPEN_NONE       // не торговать
};
input ENUM_OPEN_DIRECTION  Trade_Direction = OPEN_BOTH;    // Направление торговли:

And the user gets a drop-down list with a choice of 4 items of what you have written there in the comments - "Buy only", "Sell only", etc. Very useful for listing a set of indicators, timeframes, a set of conditions etc. in the user settings window