Please don't kick me, but explain on your fingers what kind of OOP is and how to prepare it.
I hope to hear an answer from MKL5 creators and programmers who asked to make OOP in MKL5.
As far as it speeds up or slows down. On the face of it, MKL5 is a resource eater with no increase in speed as compared to MKL4.
I would like to see concrete examples of performance gains.
![Написание советника в MQL5 с использованием объектно-ориентированного подхода Написание советника в MQL5 с использованием объектно-ориентированного подхода](https://c.mql5.com/36/1/napisanie-sovetnika-v-mql5-s-ispolzovaniem.png)
- 2010.07.12
- Samuel
- www.mql5.com
I told you not to kick me, read my post again.
P.S. I looked it up but never understood what it was all about.
I told you not to kick me, read my post again.
P.S. I did, but I still don't know what the point is.
Well, as far as I understood, OOP allows you to create more complex algorithms in a programme.
Complex algorithms do not mean effective ones.
To get into a house, you can get in through a door, or through a window, or through a chimney.
That is why I asked for examples (preferably for trading, not for tetris).
Try reading the articles
I've read it. It helps.
Of course, OOP is not a panacea.
it's going to eat up more resources
because it loads the entire object
in structured programming, the compiler discards unused functions
so, unlike structured programming, basic programming has its own advantages
generally speaking, OOP allows you to create a structure to store data with specific methods
of course, all this opens up a lot of opportunities for OOP and the difference from the structure
but it's up to each individual to decide which approach to take
Try reading the articles
reading helps.
I did. It doesn't.
That's why I'm asking if OOP is useful for trading and not for tetris. I could not find any examples.
Reading. It doesn't help.
That's why I'm asking if there's any use of OOP for trading rather than for tetris. I couldn't find a single example.
OOP does not increase performance. Its usefulness - for example, there is some function called with some parameters (let's say EMA calculation), the function uses a static variable to store the previous EMA value. Since the function stores the last value to be used for calculations, it cannot be called with other parameters (symbol, timeframe, smoothing period) the next time the function is called, therefore, if the function needs to be called with different parameters, it is necessary to make a copy of it with a different name or use a global variable passed by reference instead of a static one. This is the only case where it's more convenient to use object - you load an object instance, set its parameters and then call the method without parameters. If the object includes methods, which execution does not depend on previous executions or in general on any parameters with which the object is loaded, it does not give anything but consumption of resources.
![Документация по MQL5: Основы языка / Функции / Вызов функции Документация по MQL5: Основы языка / Функции / Вызов функции](/i/community/logo_mql5_small.png)
- www.mql5.com
Please don't kick me, but explain on your fingers what kind of OOP is and how to prepare it.
Hope to hear the answer from MKL5 creators and programmers asking to make OOP in MKL5.
So, a little about OOP (I explain it on my fingers, as I can)...
TheGeneric-oriented programming (OOP) - a programming paradigm in which the basic concepts are the concepts of objects and classes.
In terms of MQL5, the basic elements of OOP are: structures, classes (which have their own properties and methods), objects and events.
Regardless of the language, in which the programming is done, it is necessary to know (like a prayer or a multiplication table) the following concepts: Data Abstraction, Encapsulation, Inheritance and Polymorphism.
The standard MQL5 library currently includes the following trade classes: CAccountInfo, CSymbolInfo, COrderInfo, CHistoryOrderInfo, CPositionInfo, CDealInfo and CTrade.
As far as I know, the developers are going to expand the list of objects of the standard library (and nobody forbids to form own library of object classes).
Serj_Che:
Does it speed up the work or slow down. At first glance MKL5 is a resource eater without any increase in speed compared to MKL4.
I would like to see concrete examples of performance gains.
If even MQL4 implements(by some miracle) half of what MQL5 already allows, it will consume 100 times more resources than you expect (strange as it may seem). I mean purely MQL4 here, without third-party DLLs and other program tuning...
Actually the OOP implemented in MQL5 (together with the resources of the terminal itself) would give a significant increase in the speed of operation, applying a normal approach.
Reading. It doesn't help.
That's why I'm asking if there's any use of OOP for trading and not for tetris. I couldn't find a single example.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Please don't kick me, but explain on your fingers what kind of OOP is and how to prepare it.
I hope to hear an answer from MKL5 creators and programmers who asked to make OOP in MKL5.
As far as it speeds up or slows down. At first glance, MKL5 seems to be a resource eater with no increase in speed compared to MKL4.
I would like to see concrete examples of performance gains.