Wishes for MQL5 - page 4

 
drknn:
Integer:
drknn:
Well, I have a modest suggestion. I propose to introduce a function into the language, that will return the number of array cell, in which the given value lies (or in case of failure - return minus one). Otherwise we have to make a loop every time. The ArrayBsearch() function does not work - it returns the wrong value.

The value returned by this function will still be checked to be equal to -1, so you can check the value with the index returned by ArrayBsearch to be equal to the value you are looking for. Not a big difference

I quote from the reference.

int ArrayBsearch(...)
Returns the index of the first found element in the first array dimension.
If there is no element with the specified value in the array, the function will return the index of the nearest element (by value).

Well, when you are searching for the index of not just a number, but of a ticket in the array, this function does not suit at all - why do I need the index of the nearest similar ticket, when I need exactly this ticket, and if it is absent, the order is not among the market ones - it's closed and we should find it in the history! When you work with synchronously shifted arrays, the index is a very important thing, and it must either be accurate, or not available.



Once again, read what I wrote to you

"The value returned by this function will still be checked for equality to -1, so you can check the value with the index returned by ArrayBsearch for equality to the searched value. Not a big difference."

Find the closest ticket, compare it to the one you were looking for, if it's not equal, it's not in the array.

 
Integer:

Read again what I wrote to you

"The value returned by this function will still be checked for equality to -1, so you can check the value with the index returned by ArrayBsearch for equality to the value you are looking for. Not a big difference."

Found the closest ticket, compare it with the ticket, if it is not equal, it means it is not in the array.

Why do you have to go around all the time? Show me a normal programming language that doesn't have a function that returns the index of the required array element. Fine, I'll write the function myself, then at least let me pass the array into a subroutine as a parameter.

The disadvantages in MQL4 are numerous. The flexibility of this language is insignificant. Let's listen to our needs and save the Expert Advisor's code. А? Or the developers do not care about anyone but themselves?

 
drknn:

Well, let me write this function myself, then at least allow me to pass the array as a parameter to the subroutine.

In MQL4 it's easy to pass an array to a subprogram and just as easy to accept.
There are a lot of disadvantages in MQL4. Let's listen to what's necessary and save Expert Advisor code. А? Or don't the developers care about everyone but themselves?
Yes, the disadvantages are well known. The developers haven't said anything against it, have they? We have been working on the MQL5 language for a long time.
 
drknn, have a look here: https://docs.mql4.com/ru/basis/variables/formal. It's all about transferring arrays.
 
xenon13:

With all due respect MQL4 is still the best MTS on the market, the following things are very much missing:

1. API or a possibility to call EA functions from DLL (Mister Developers - really need it !!!! )

Event handlers - at least one, system event (a CallBack or something with a message number, for example the message - trading on this symbol is stopped)

3. Structures, assignments in record a = b = d = e, implicit type conversions.

I ask others to join and continue the wish list in this thread.

P.S. once again about the first point, you may leave everything as it is - but make call from DLL.


I would like to see an object-oriented language close to C++

If we're getting closer to trading

I would like to get

1 call this function with customizable timer (would be a very nice feature)

2 LOSS TAKE ACTION ( Although I understand that this can be tracked programmatically using different handlers)

3 it would be nice to have some kind of visual debugger ( although I am satisfied with the check print)

 
Mathemat:
drknn, have a look here: https://docs.mql4.com/ru/basis/variables/formal. It's all about transferring arrays.

Thanks. I'll have a look.
 
Renat:
Yes, the shortcomings are known. The developers haven't said anything against it, have they? We have been working on the MQL5 language for a long time now.

I'm sorry, perhaps I overreacted. The problem is that there is no proper guide to the language. If we had had a proper help, the users would have had fewer questions.
 
A list of new features of the MQL5 language would be published by MQ. It would have been possible to discuss some items in advance - the new language properties. The developers would have tweaked their plans. We could even take a vote on the new features or those that are, for example, abolished.

By the way, it would be good to add sorting of tabs with code in meta-editor. Often one wants to group some modules side by side so as not to scroll constantly to find needed one.
There was a problem in a language when I passed a string character variable which was a parameter of another function.
It didn't work that way:

func(Symbol());

void func(string symbol) {
mql_func(symbol);
}

But it works like this

void func() {
mql_func(symbol();
}
 
drknn писал (а):


Why do you have to go around all the time? Show me a normal programming language that doesn't have a function that returns the index of the required array element. Fine, I'll write the function myself, then at least let me pass the array into a subroutine as a parameter.


Delphi doesn't have such a function. :) And maybe it exists somewhere in a separate module. If it exists, I don't know anything about it, because it's easier to write it myself than to look for it or not.

By the way, implementing the algorithms yourself is just not a "workaround". "Workaround" is when you use third-party components, procedures, libraries and pieces of ready-made code. This is bypassing. The scientific term for this is "lamerism". :)
Developers already said that they make a language for programmers, not lame-duck programmers. :)

Any functions that many people want, you can make yourself in half an hour, instead of waiting for 3 years until the developers do it for you. Then you cram them into a separate library and simply insert into each new Expert Advisor with a usual inlude. Is it so hard to think it through? This is a kindergarten. The language is cool, there are a lot of opportunities for creativity. But if a person is not creative, this language is contraindicated to him. He is contraindicated in many things, including trading. :) Sorry for the possible abruptness, I couldn't bear it.



I only wish a transition operator had been added. The rest is fine with me.

If I wanted to change the OrderLots parameter in real trade, I would not want to have to delete it and set a new one. I have all my states filled with pending orders. I think it should not be difficult to implement. Renat, if you are reading this, please reply.
 
Bauleken:
drknn wrote (a):


Man, why do you have to go around all the time? Show me a normal programming language, that doesn't have a function that returns the index of the required array element. Come on, I'll write this function myself, then at least let me pass the array into a subroutine as a parameter.


There is no such function in Delphi. :) If it exists, I do not know anything about it, because it's easier to write it yourself than to look for it or not.

By the way, implementing the algorithms yourself is just not a "workaround". "Workaround" is when you use third-party components, procedures, libraries and pieces of ready-made code. This is bypassing. The scientific term for this is "lamerism". :)
Developers already said that they make a language for programmers, not lame-duck programmers. :)
Shouldn't we program in machine code altogether? Why all these high-level languages and even assembler? With such a unique thing as machine code you can do whatever you want :)


Any functions that many people want, you can make yourself in half an hour, instead of waiting for 3 years until the developers do it for you. Then you cram them into a separate library and simply insert into each new Expert Advisor with a usual inlude. Is it so hard to think it through? This is a kindergarten. The language is cool, there are a lot of opportunities for creativity. But if a person is not creative, this language is contraindicated to him. He is contraindicated in many things, including trading. :) Sorry for the possible abruptness, I couldn't bear it.
:))))))))))) Cheered me up - gave me a hearty laugh :))))))))) thanks. No, really :)))))
I only wish a transition operator had been added. The rest is fine with me.

If I wanted to change the OrderLots parameter in real trade, I would not want to have to delete it and set a new one. I have all my states filled with pending orders. I think it should not be difficult to implement. Renat, if you are reading this, please reply.
If you read it, please answer me, but could you please tell me more about it? You can modify a put position or I don't understand something?
Reason: