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
The function does not work in test mode. This function also cannot be called from the user indicators.
Sending may be prohibited in the settings, also the e-mail address may not be specified. The GetLastError() function must be called to get the error information.
[...]
In the indicator, admittedly, I haven't checked... :)
Z.U. I object to the title of the topic and propose to rename it to something like this: "Improvement of MQL4 documentation: removal of inaccuracies and deficiencies". Something like that.
Then I saw it in other places in the documentation as well.
Please explain, is it just a programming style?
If it's not, what is the reason for using the comparison operation for logical variables?
Why isn't a simpler expression used?
Why isn't a simpler expression used:
- Symbol
- Order type
- Position volume in lots
- The price of discovery
- Slippage in pips
and so on. The parameters passed to the function can be of two types: those that do not change in any way during the operation of the called function, and those that can be processed in it.For example, let's consider the following function:
Three parameters are passed into SplitString(): an ArrayRes array by reference (preceded by an ampersand &) and two formal parameters InputStrung (the string to be split into parts) and splitter (which is the splitter for splitting).
When the function is executed, the ArraRes array will contain several strings. The function itself in MQL4 cannot return complex types (e.g. array), but by using passing the parameters by reference, we avoid this restriction.
The full script is as follows :
Run it in your environment and see the result.
The order must be preselected using OrderSelect().
The description is on the OrderClosePrice function, while the example is on the OrderClosePrice function.
That's probably why 99% of the Expert Advisors we review do an absolutely unnecessary analysis of the order type
When you could just write
------
Three parameters are passed to SplitString(): ArrayRes array by reference (with ampersand & in front) and two formal parameters InputStrung (the string to be parsed) and splitter (which is the splitter for parsing).
When the function is executed, the ArraRes array will contain several strings. The function itself in MQL4 cannot return complex types (e.g. array), but by using passing the parameters by reference, we avoid this restriction.
------
I understand that. I don't understand why you called them "formal". Are these parameters that are passed just for fun, purely formally? There's no such thing in C.
Why is the description of parameter types described in the "Variables" section and not in the "Functions" section?
I understand that. I don't understand why you call them "formal". Are they parameters that are just passed around, purely formally? There is no such thing in C.
Because the variables passed into a function are passed there formally, not as variables, but as their values. Variables can be manipulated (their values changed), while such manipulations with values are meaningless.
Here is another version of this example:
Formally means that nothing depends on its value, e.g. reserved for future use :). But parameters passed by value do depend on something, otherwise they would be called formal :).