Discussion of article "Debugging MQL5 Programs" - page 2

 

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
 
Renat:

We will definitely improve the debugger as soon as we finish MT4 upgrade.

Renat, the debugging system is really not thought out somehow. Debugging in real-time mode is immoral :) Debugging of Expert Advisors should be performed in the strategy testing mode. Otherwise, breakpoints can be thrown into the trash and debugged "on your knees" via text files and logs. I think this is the reason why MT5 is unpopular, because they have added functionality, but it is not applicable, i.e. MT5 has debugging, classes and other goodies, but it is impossible to use them. Until there is a normal debugger, all efforts will be in vain.

Regards, Alexander.

 
Bonifacy:

Renat, the debugging system is really not thought out somehow. Debugging in real-time mode is immoral :) Debugging of Expert Advisors should be performed in the mode of testing strategies. Otherwise, breakpoints can be thrown into the trash and debugged "on your knees" via text files and logs. I think this is the reason why MT5 is unpopular, because they have added functionality, but it is not applicable, i.e. MT5 has debugging, classes and other goodies, but it is impossible to use them. Until there is a normal debugger, all efforts will be in vain.

Regards, Alexander.

I remember, when neither debugger nor structures were available in 4, I had to debug both MQL and DLL in a pair.

That's why it's ridiculous to say that it's "impossible to use" what we have now.

Whoever wants - looks for an opportunity. They made breaks, debug and thanks for that, it helps 100% in modular debugging. And globally - you can put Print in the old-fashioned way.

And to make MT5 popular, you need to get away from MT4, stop support, oblige brokers to switch. As happened with MT4 builds < 600. It does not depend on developers, especially MQL-developers.

 
elugovoy:

I remember that in 4 when there was neither debugger nor structures, we had to debug both MQL and DLL in a pair.

That's why it is ridiculous to say that "it is impossible to use" what we have now.

Whoever wants - looks for an opportunity. They made breaks, debug and thanks for that, it helps 100% in modular debugging. And globally - you can put Print in the old-fashioned way.

And to make MT5 popular, you need to get away from MT4, stop support, oblige brokers to switch. As happened with MT4 builds < 600. It's not up to the developers, much less MQL developers.

Boniface is 100% right. There is no point in remembering the past century. It is really impossible to use what is available. A software that claims to be a Product should not make you look for opportunities, but provide them. Of course, prints and homemade traces come to the rescue instead of a debugger. But it is exactly a substitute.
 
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! :)

 
Thanks for the article! Super helpful!
 
MetaQuotes Software Corp.:

New article Debugging MQL5 programs has been released:

By Nikolay Demko

Can mql view the call stack?
 
what are the numbers in quotes when debugging?