![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
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.
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?
Well, let me write this function myself, then at least allow me to pass the array as a parameter to the subroutine.
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)
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.
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();
}
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.
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.
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.
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.
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.