Standard library

 

As a newbie in OOP, I would like to ask a question about the object oriented structure of MQL5.


I'm reading the reference now and there is a section describing the standard library of MQL5.

But, none of the predefined functions described earlier in the reference are in the standard library.

And, we use these functions without an #include directive.


I would like to ask ... where these predefined functions (for example OrderSend, Print, Alert etc.) are in the object oriented structure of MQL5? 

 
kemalturgay:

As a newbie in OOP, I would like to ask a question about the object oriented structure of MQL5.


I'm reading the reference now and there is a section describing the standard library of MQL5.

But, none of the predefined functions described earlier in the reference are in the standard library.

And, we use these functions without an #include directive.


I would like to ask ... where these predefined functions (for example OrderSend, Print, Alert etc.) are in the object oriented structure of MQL5? 

No, they are built in functions of MQL5. You can easily distinguish OOP and non-OOP parts by presence of a class or object context. For example, OrderSend() is used as a standalone method. But something like t.PositionOpen(...), where t is declared as an object of class (supposedly CTrade in this case) you are in OOP.
 
marketeer:
No, they are built in functions of MQL5. You can easily distinguish OOP and non-OOP parts by presence of a class or object context. For example, OrderSend() is used as a standalone method. But something like t.PositionOpen(...), where t is declared as an object of class (supposedly CTrade in this case) you are in OOP.

Ok, thanks ... I'm not an experienced programmer, I just have some background in C++.

In C++, there are also some predefined functions but we need to include a header for using them.

So, I thought that there also should be a file for built-in functions in MQL ... but we use them without including any file.

I would like to ask where the definitions of these built-in functions are in MQL?

 
kemalturgay:

Ok, thanks ... I'm not an experienced programmer, I just have some background in C++.

In C++, there are also some predefined functions but we need to include a header for using them.

So, I thought that there also should be a file for built-in functions in MQL ... but we use them without including any file.

I would like to ask where the definitions of these built-in functions are in MQL?

This is one of several differences between MQL and C++. Built-in function do not require includes here. They are implemented in the core (C++) and implicitly "linked" with all your code.
 
Thanks marketeer, clear now.