MQL4 TUTORIAL BASICS – 123 HOW TO FIND ERRORS IN BIG JOURNAL FILES

video
play-sharp-fill

In this video we are going to look for errors. This should be a sell trailing stop but as you can see there is nothing trailing. So we have an error. We can’t see the cause.

It doesn’t appear on the chart. We have some results. Nothing on the graph tab, nothing inside of the reports. But the journal tab shows a lot of errors here. I did that by purpose to show you how to find errors in big journal files.

So let’s stop the test here. You can see we have hundreds and hundreds of entries here. In this case it wouldn’t be hard to find out that we have errors, but if these errors only occur every two or three days, it would be hard to find. So we need to have a way to do that. Please right click and select open.

Now you should see an explorer window for the log file. This is the log file from today and when you put the mouse over the file name, you will see that this is a single file and it is 640 megabytes. So it’s a very big file. If I right click it and select open, Windows would try to open it in Notepad. And it would probably crash because Notepad is not a good choice to deal with big files. Therefore, I’m going to use this application here.

It is called Notepad Plus Plus. This is a free editor that is able to deal with huge files. You can download it on websites like Chip for free. So this is myLog file and when I scroll down you will see that we have a few hundred thousand lines here, exactly 5.2 million. Now you could go through the whole file manually but it would take hours and hours to do that.

And the good thing is that this editor has a good search function. Let me modify the language here. So this should be better for you. Now we click on search, find. I would like to look for the term error and now I click on find all in current document. This might take a little while.

Now here is my search result and I can now click on any of the entries and it will take me to the line where the error is located. As I said before, I intentionally have caused these errors because I have used a totally wrong value for the stop loss. If your file gets too big you can right click into the Journal and Select Clear all journals that will also delete the file in the directory. Let’s speed that test up a little bit and you will get a new journal file. This time I have a different expert advisor and it says order modify Error 130.

If you go to Google and look for that error, one of the first entries should be from bookmql4.com. This is the error codes appendix and here you can find all the errors and some additional explanations. This might be helpful because not every error code is easy to understand. That’s it for now. Because in this little video you have learned how to find errors even for big journal files and you have done it yourself within a few minutes.