![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Well, I just published it on shared projects as a cloud storage project.
Go and look for "MQLplus Include Library Collection" in the shared projects. Feel free to contribute.
Include the library as follows:
#define LIB_DEBUG #include <../Shared Projects/MQLplus/lib_debug.mqh>
Here is how its used.
Yes, you can spread the macros over your code as you like.
Well, I just published it on shared projects as a cloud storage project.
Go and look for "MQLplus Include Library Collection" in the shared projects. Feel free to contribute.
Include the library as follows:
Here is how its used.
Yes, you can spread the macros over your code as you like.
Hi @Dominik Christian Egert -- very, very powerful stuff you put together here... and elegant as well, BRAVO!!! 👏 👏 👏
I must say that skimming through over 2500 lines of macro code quite was quite intimidating at first, but thankfully I still remember enough of my C-preprocessor hacking days ages ago to follow along and am starting to get a hang of it.
One thing I could try and contribute if you find it adds value to the library, is a general purpose conditional code execution macro in case you don't have one -- I couldn't identify a suitable one in my initial forays into your header file. Basically, sometimes I want to have a one or more counters to check how many times some part of a function/method got executed, but only while debugging.
Perhaps something along these lines could do the trick. Let me know what you think, and whether this can already be done with lib_debug.mqh or if there is a better way to look at it... Thanks in advance.
Hi @Dominik Christian Egert -- very, very powerful stuff you put together here... and elegant as well, BRAVO!!! 👏 👏 👏
I must say that skimming through over 2500 lines of macro code quite was quite intimidating at first, but thankfully I still remember enough of my C-preprocessor hacking days ages ago to follow along and am starting to get a hang of it.
One thing I could try and contribute if you find it adds value to the library, is a general purpose conditional code execution macro in case you don't have one -- I couldn't identify a suitable one in my initial forays into your header file. Basically, sometimes I want to have a one or more counters to check how many times some part of a function/method got executed, but only while debugging.
Perhaps something along these lines could do the trick. Let me know what you think, and whether this can already be done with lib_debug.mqh or if there is a better way to look at it... Thanks in advance.
Thank you.
If I understand you correctly, you are looking for some type of counter. - I think you could "missuse" the macros for loop tracing.
Look for DBG_TRACE_LOOP_BEGIN, DBG_TRACE_LOOP_START, DBG_TRACE_LOOP_FINISH, DBG_TRACE_LOOP_END. Or maybe even the "complex" version of these, using the ID specifyer.
In this example it is used as a loop tracing counter, but in fact, since all are macros, they dont care about loops, and you could also see part of a function, or even more of your code as a loop, recurring calls like OnTick could be traced this way, and yes it should be possible to trace down certain parts of the code on how often they were called or executed.
Although I havent tested them, since you said, you are able to read that cryptic stuff, I suppose, you might get into it.
If you would like to contribute to the code, you are welcome, as said, and as documented in CodeBase, its available on SHared Storage as part of the project MQLplus inlcude library collection. (Not much in it yet)
I updated lib_debug.mqh today with some new features, like logging all debug to a file, but havent updated the docs. - Also I am working on some way of tracing MQL-API function calls, but that is as well stil lin development, and will probably not be feasable with the limitations of the preprocessor. - but maybe someone finds a good way to solve it before I do.
Anyways, if you want, join the project, Ill assign you write permissions.