Discussion of article "Debugging MQL5 Programs"

 

New article Debugging MQL5 Programs is published:

This article is intended primarily for the programmers who have already learned the language but have not fully mastered the program development yet. It reveals some debugging techniques and presents a combined experience of the author and many other programmers.

Debugging is a stage in program development meant for detecting and removing program execution errors. During the debugging process, a developer analyzes an application trying to detect possible issues. Data for analysis is received by observing the variables and program execution (what functions are called and when).

There are two complementary debugging technologies:

  • Using the debugger - utility showing step-by-step execution of the developed program.
  • Interactive display of variables' states and functions' invocations on a screen, in the journal or in a file.

Debugging process - viewing variable values

Debugging process. Viewing variable values.

Author: Nikolay Demko

 

And for debuging during weed end or without connection with the market? Have you got solution? Because there is a problem after the "OnTick" with the debugger, On MT4 there is an "Tick generator", something like this on mt5?

Thanks in advance,

 
Bisemper:

And for debuging during weed end or without connection with the market? Have you got solution? Because there is a problem after the "OnTick" with the debugger, On MT4 there is an "Tick generator", something like this on mt5?

Thanks in advance,

We can make an association about that ;-)
 

I tried to debug EA on 1 minute chart but MT4 starts automatically 1H chart and it is not possible to switch the time frame afterwards. Is there any method to overcome this  ?? My EA uses Time commands

which on hourly chart return hours not minutes as wanted

 
krzysiaczek99:

I tried to debug EA on 1 minute chart but MT4 starts automatically 1H chart and it is not possible to switch the time frame afterwards. Is there any method to overcome this  ?? My EA uses Time commands

which on hourly chart return hours not minutes as wanted

This forum is about MT5/mql5, please post your question about MT4/mql4 on this forum.
 
So this behavior don't occur for MT5 ?? I thought debugger is the same
 
Bisemper:

And for debuging during weed end or without connection with the market? Have you got solution? Because there is a problem after the "OnTick" with the debugger, On MT4 there is an "Tick generator", something like this on mt5?

Thanks in advance,

Hi Bisemper

I had the same problem, my solution was to use Alert("messsages/values/variables/etc.") to pipe out to Journal in the Strategy Tester.

A little long winded but hey it works! :)

Reason: