Discussion of article "The Use of the MQL5 Standard Trade Class libraries in writing an Expert Advisor" - page 3

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
There are also lines in the COrderInfo class
return(FormatType(str,Type())); ... FormatType(type,Type()) ... if(m_type==Type() && m_state==State() &&
But the Type() function is absent in the class.
Section 1.4 of the article provides the features of the COrderInfo class, which, judging by the description, is designed to work with active pending orders. It is suggested to do the following:"To use this class to get the properties of pending orders, we first request the total number of orders and select them by order ticket"
But if the HistorySelect() function is designed to query"history of transactions and orders", i.e. to query historical orders, why use this function when querying the total number of active pending orders?In the COrderInfo class ...
But the Type() function is absent in the class.
Can someone please explain? Here is a piece of code from the CDealInfo class:
Here the function CDealInfo::FormatDeal(string& str) contains this line:
symbol.Name(Symbol());
In turn, the Symbol() function is defined both in the CDealInfo class itself and among the standard functions of the client terminal. Which function is passed as an argument to the symbol.Name() function? By what rule?Can someone please explain? Here is a piece of code from the CDealInfo class:
Here the function CDealInfo::FormatDeal(string& str) contains this line:
In turn, the Symbol() function is defined both in the CDealInfo class itself and among the standard functions of the client terminal. Which function is passed as an argument to the symbol.Name() function? By what rule?The same rule as with the scope of variables works here. If a variable is declared under one name at the global and local levels, then inside the local scope the name will point to the local variable and outside to the global one.
It turns out that if a standard function is overloaded inside a class, the overload body will be called in the class itself and the body of the standard function will be called at the global level. The body of the overloaded function can be called at the global level through the class pointer.
The same rule works here as with the scope of variables. If a variable is declared under the same name at the global and local levels, then inside the local scope the name will point to the local variable, and outside to the global one.
It turns out that if a standard function is overloaded inside a class, the overload body will be called in the class itself and the body of the standard function will be called at the global level. The body of the overloaded function can be called at the global level through the class pointer.