Download MetaTrader 5

Discussion of article "Debugging MQL5 Programs"

To add comments, please log in or register
Your conversation partner speaks foreign language? Automatic translation will help you!
MetaQuotes Software Corp.
Moderator
181409
MetaQuotes Software Corp. 2013.04.19 16:51 

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

Julien POIROT
119
Julien POIROT 2013.05.04 21:39  

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,

Alain Verleyen
Moderator
30754
Alain Verleyen 2013.05.04 22:19  
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 ;-)
krzysiaczek99
297
krzysiaczek99 2014.02.26 21:01  

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

Alain Verleyen
Moderator
30754
Alain Verleyen 2014.02.26 23:40  
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.
krzysiaczek99
297
krzysiaczek99 2014.02.26 23:59  
So this behavior don't occur for MT5 ?? I thought debugger is the same
Paul
39
Paul 2015.01.11 15:25  
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! :)

To add comments, please log in or register