In the library itself, remember to specify:<br / translate="no"> #property library
Early versions of MT didn't seem to do this automatically. And what version you have, I don't know. I don't use header files. I just declare the functions to be called in the code.
Thank you, it's a very helpful instruction. As far as I understood, the #include directive need not be used. Can I just insert all the declarations into the code explicitly ?
All functions are placed in an inluder, from which they can be called later in scripts, indicators or Expert Advisors. When compiling, all code of the inline is inserted into the source code and unnecessary (non-callable) functions are automatically removed.
I did not compare the speed of libraries, but Slava (I think) said that #import works much slower than #include.
PS: For information, maybe some people don't know, maybe some people will find it useful ;o)<br / translate="no">
http://www.basegroup.ru/neural/conjugate.htm[/quote] A very pertinent link to the question. Thank you! Now I would like to get hold of some recommended readings for the article N.N.Moiseev, Yu.P.Ivanilov, E.M.Stolyarova "Methods of Optimization", Nauka, 1978 A.Fiacco, G.McCormick "Nonlinear Programming", World, 1972. W.I.Zangvill "Nonlinear Programming", Moscow Soviet Radio, 1973 Jonathan Richard Shewchuk, "Second order gradients methods", School of Computer Science Carnegie Mellon University Pittsburg, 1994
Maybe someone knows where to download it? I can't find it in search engines, except for some offers to buy it at booksellers with postal delivery. In principle, if it is not available in electronic form, you may have to do just that - order it by mail.
Thank you, I understand. Actually, I was worried about this:
When compiling, all of the inline code is inserted into the source code and unnecessary (non-callable) functions are thrown away automatically.
One more thing. As far as I understood the *.mqh file contains only headers. And you also need a corresponding file with source codes in libraries. Is it so ?
No, the *.mqh file contains the functions themselves (source code). Imagine that you have decided to include all functions from your indicator in a separate file and name it so that you can include it in other source code later. An example can be found in the article My statistics (#include command) - http://www.alpari-idc.ru/ru/experts/articles/24.html
Thanks, I've got it all figured out. It's just that the MQL reference book describes a different scheme. However, this is exactly what I wanted: to insert the required sources from the library file into the program text before compilation.
Thanks, I've got it all figured out. It's just that the MQL reference book describes a different scheme. <br / translate="no"> That's what I wanted, though: to insert the required sources from the library file into the program text before compiling.
In principle, it's written there correctly, originally header files in C were conceived specifically to store all sorts of descriptions, and perhaps it's me using it incorrectly.
Early versions of MT didn't seem to do this automatically. And what version you have, I don't know. I don't use header files. I just declare the functions to be called in the code.
Thank you, it's a very helpful instruction.
As far as I understood, the #include directive need not be used. Can I just insert all the declarations into the code explicitly ?
Something now I have completely lost my understanding of how to do it.
Rosh, explain how you do it.
I did not compare the speed of libraries, but Slava (I think) said that #import works much slower than #include.
A very pertinent link to the question. Thank you!
Now I would like to get hold of some recommended readings for the article
N.N.Moiseev, Yu.P.Ivanilov, E.M.Stolyarova "Methods of Optimization", Nauka, 1978
A.Fiacco, G.McCormick "Nonlinear Programming", World, 1972.
W.I.Zangvill "Nonlinear Programming", Moscow Soviet Radio, 1973
Jonathan Richard Shewchuk, "Second order gradients methods", School of Computer Science Carnegie Mellon University Pittsburg, 1994
Maybe someone knows where to download it? I can't find it in search engines, except for some offers to buy it at booksellers with postal delivery. In principle, if it is not available in electronic form, you may have to do just that - order it by mail.
One more thing. As far as I understood the *.mqh file contains only headers. And you also need a corresponding file with source codes in libraries. Is it so ?
An example can be found in the article My statistics (#include command) - http://www.alpari-idc.ru/ru/experts/articles/24.html
However, this is exactly what I wanted: to insert the required sources from the library file into the program text before compilation.
In principle, it's written there correctly, originally header files in C were conceived specifically to store all sorts of descriptions, and perhaps it's me using it incorrectly.