Download MetaTrader 5

My MT4 folder has above 60GB capacity - question - page 2

To add comments, please log in or register
dasser
70
dasser  
RaptorUK:

Not sure what you mean by that last comment . . but I'll take the thank you :-) and explain what I do . . .

I have an extern and some bools . . .

in init() I do this . . .

then I use this to control which Print statements get executed . . .

If I set Debug_Level=0 then I get no debugging messages and very small log files . . . I still have the option to Print important messages that I want regardless . . . I just don't use the if (Dx)

I stumbled across this but was thinking about how I might tun off my debugs without using // all the time ...

That's a very smart way to set up the debug, thanks :-)

Dasser

Alain Verleyen
Moderator
32401
Alain Verleyen  
dasser:

I stumbled across this but was thinking about how I might tun off my debugs without using // all the time ...

That's a very smart way to set up the debug, thanks :-)

Dasser


You have to use If statement, something like :

extern int debugmode = 1;    // 0 = off, 1 = on


if (debugmode == 1) 
   Print("blablabla...");
and set debugmode to 0 when you don't need to print.
Ex Ovo Omnia
3292
Ex Ovo Omnia  

And if you want to make it more complex, I use a custom function debug(string msg, int level), which outputs messages to a separated debug file. The file is rewritten every time a new debug starts.

The debug output and its level are controlled by a public variable, which enables anybody (even a customer without a source code) to switch it on and off and send me the debug file.

ydrol
593
ydrol  

Also (hoping thread is not too old!),, I have my EA reduce the logging level after a number of days (modelled) ...,

So for the start date and a few days after, full logging, then it falls away to just important messages.

If I see bad exit/entry in the the job history, then I re-test against that day, and get full logging again...

file45
157
file45  

Create a script to delete MT4 / MT5 log files (builds 670 and 965 respectively current)

See here # post 5 

12
To add comments, please log in or register