Hi, i have a question, i used to place all the code in the same mq4 file, all together, but as soon the code became to big, i needed to separate it, to organize it better, so it becomes better to reuse the code in other projects.
I see i can use include files and libraries, so my question:
is better to use include or libraries to organize it?
I have another question, about reusability of the code, i use functions to reuse the code, i place basically all EA work in functions, and i can only code in procedural, my question is: if i learn OOP it is better to reuse the code or there is no advantage compared to using functions?
I do not think there is any advantage in splitting the code into library files in MQL. It splits the executable as well, which is not very convenient. The include files are better for splitting code into modules.
Starting with OOP from scratch in MQL is probably not a good idea, it would be more painful than in other programming languages with their rich support in editor and basic class packages. You will find no advantage if you have no prior experience.
I do not think there is any advantage in splitting the code into library files in MQL. It splits the executable as well, which is not very convenient. The include files are better for splitting code into the modules.
Starting with OOP from scratch in MQL is probably not a good idea, it would be more painful than in other programming languages with their rich support in editor and basic class packages. You will find no advantage if you have no prior experience.
Hi, i have a question, i used to place all the code in the same mq4 file, all together, but as soon the code became to big, i needed to separate it, to organize it better, so it becomes better to reuse the code in other projects.
I see i can use include files and libraries, so my question:
is better to use include or libraries to organize it?
I have another question, about reusability of the code, i use functions to reuse the code, i place basically all EA work in functions, and i can only code in procedural, my question is: if i learn OOP it is better to reuse the code or there is no advantage compared to using functions?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, i have a question, i used to place all the code in the same mq4 file, all together, but as soon the code became to big, i needed to separate it, to organize it better, so it becomes better to reuse the code in other projects.
I see i can use include files and libraries, so my question:
is better to use include or libraries to organize it?
I have another question, about reusability of the code, i use functions to reuse the code, i place basically all EA work in functions, and i can only code in procedural, my question is: if i learn OOP it is better to reuse the code or there is no advantage compared to using functions?