This question reminds me that old Chinese Proverb ... "Four things come not back: the spoken word, the spent arrow, the past life, and the neglected opportunity."
In the same way, the lost tick at MT5 debugger, or even in no emulation mode, come not back.
Yes I did but let me ask
you something about it ...
When you debug an intraday
chart you are actually stopping "time" to evaluate the variables. If
the system runs on a tick basis, Even If I take too much time, the Debug will
evaluate the values tick by tick or (2) next time I run the OnTick(), it will take
the actual condition.
Regards,
Of course if you stop the program on a tick, then start to debug, you will miss some ticks.
Using your Report you just have an option to define the size of log output.
One way to define levels is create a debug function comparing the message level and debug level, for instance:
int debugLevel=2; // debug level, for instance critical conditions based on syslog (declare this global)void debug(string debugMessage, int level)
{
if (level<=debugLevel) Print(debugMessage);
}
Now you just have to insert in your code what you need debug (create the message) and the message level:
// I just want debug this part at level 4string debugMessage=StringFormat("Contratos=%i, Etc=%i",contratos,etc);
debug(debugMessage,4);
Note that, in the example, as debugLevel=2, the message won't be print, since message level is 4. So, to print such level, you need change debugLevel to 4 or greater number.
The advantage of this approach is that you can precisely define the number of messages and debug level of each message, while using your Report you just have 4 fixed outputs, and probably this creates lots of debug messages each time you need to use it to debug.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
This question reminds me that old Chinese Proverb ... "Four things come not back: the spoken word, the spent arrow, the past life, and the neglected opportunity."
In the same way, the lost tick at MT5 debugger, or even in no emulation mode, come not back.
Yes I did but let me ask you something about it ...
When you debug an intraday chart you are actually stopping "time" to evaluate the variables. If the system runs on a tick basis, Even If I take too much time, the Debug will evaluate the values tick by tick or (2) next time I run the OnTick(), it will take the actual condition.
Regards,
Of course if you stop the program on a tick, then start to debug, you will miss some ticks.
Do y have an example ?
Using your Report you just have an option to define the size of log output.
One way to define levels is create a debug function comparing the message level and debug level, for instance:
Now you just have to insert in your code what you need debug (create the message) and the message level:
Note that, in the example, as debugLevel=2, the message won't be print, since message level is 4. So, to print such level, you need change debugLevel to 4 or greater number.
The advantage of this approach is that you can precisely define the number of messages and debug level of each message, while using your Report you just have 4 fixed outputs, and probably this creates lots of debug messages each time you need to use it to debug.