Deactivate Log files

 

Good morning everyone,

Few months ago I wrote my personal Expert Advisor and 3 days ago I tested it on a Demo version of my trading account. When the EA is running, every day my PC create logs files (I can't open them because when I try to open a message show that Notepad can't open files big size like that). One file is already 15/20GB but I want to deactivate the creation of this files. Can someone help me to do this, please?

 
Trader1529:

Good morning everyone,

Few months ago I wrote my personal Expert Advisor and 3 days ago I tested it on a Demo version of my trading account. When the EA is running, every day my PC create logs files (I can't open them because when I try to open a message show that Notepad can't open files big size like that). One file is already 15/20GB but I want to deactivate the creation of this files. Can someone help me to do this, please?


I don't know of a way to disable log files entirely in MetaTrader. You're going to need to find out what is filling your log file and fix the code to not do that.

There are some recommendations for editors that can read large log files here:

https://www.mql5.com/en/forum/294736

Text editor to work on big files (above 100MB)
Text editor to work on big files (above 100MB)
  • 2018.12.13
  • www.mql5.com
I am used to work with Notepad++ in addition to MetaEditor, mainly to analyze log/data files...
 
Anthony Garot:

I don't know of a way to disable log files entirely in MetaTrader. You're going to need to find out what is filling your log file and fix the code to not do that.

There are some recommendations for editors that can read large log files here:

https://www.mql5.com/en/forum/294736

Thank you. That means the log files are created because there are some problems with the code of my EA?

 
Trader1529:
Thank you. That means the log files are created because there are some problems with the code of my EA?

MetaTrader Terminal creates log files. If your EA has Print() statements in it, like for debugging purposes, especially in the OnTick() event handler, you can easily fill up a MT log file.

 
Anthony Garot:

MetaTrader Terminal creates log files. If your EA has Print() statements in it, like for debugging purposes, especially in the OnTick() event handler, you can easily fill up a MT log file.

Ok, thank you

Reason: