Discussing the article: "Master MQL5 — From Beginner to Pro (Part VII): Principles of Debugging MQL Applications"
Hello Oleg, how can I get in touch with you? I’m interested in training and have a specific enquiry about creating an expert advisor.
Everrest the creation of an expert advisor
Hello. The easiest way is to send me a private message – I do read them :-)
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
Check out the new article: Master MQL5 — From Beginner to Pro (Part VII): Principles of Debugging MQL Applications.
The previous article in this series discussed the principles of building Expert Advisors in MQL5. I had planned to devote this article to reliable Expert Advisors for the Market that handle recoverable errors, including server responses. And I even started writing it.
However, after reading the previous articles, people started programming—and asking questions via private messages. Naturally, these were the kinds of questions beginners typically ask, and naturally, I was ready to answer them (and still am). And as I was answering these questions, it struck me quite clearly that before moving on to more advanced programming concepts, I needed to explain how learners can fix errors in their own code or in someone else’s. So I decided that "reliable Expert Advisors" would come next, and for now we need to talk about debugging.
Everyone makes mistakes—some more often than others… If you are new to something, you will make a lot of common mistakes that a professional spots right away and avoids automatically. However, even professionals make mistakes sometimes. Their mistakes are often simply harder to detect and have more serious consequences. And in this sense, programming is no different from any other human activity. However, unlike in many other areas of life, programming errors are fairly easy to fix—provided the program code is available and there is enough time.
The process of correcting errors in a program is called debugging. And debugging is almost a mandatory step when writing any program if that program has more than 100 lines of code. It is impossible to live without making mistakes, but correcting them is our "sacred" right. So, in this article, I will discuss the basics of debugging MQL5 programs using the built-in tools of MetaEditor. I do not think the pros will find anything particularly groundbreaking here—after all, this series is for beginners. But if I miss something or get something wrong—as always, everyone is welcome to comment.
Author: Oleh Fedorov