Download MetaTrader 5

EA send log / log files via email

To add comments, please log in or register
Sign up to publish an article and receive 200 USD
James Parker
James Parker 2015.07.07 15:36 
Is it possible to code my EA to send me a copy of the log to my email address at specified intervals?

I see there's a SendMail function but not sure how to get information from the log into it.
Aleksei Beliakov
Aleksei Beliakov 2015.07.08 15:50  
You can do it either send mail or by external dll
Carl Schreiber
Carl Schreiber 2015.07.09 00:22  
1) Don't print into the logfile but append all to one string (per day, incl. \n) and send it with mt4's sendmail() function. 2) Use e.g. a powershell script to send the log file after the new day (I don't know yet, broker time or pc-time!) independently from mt4.
I wouldn't start powershell from mt4. Start it like a service.. 3) Use the Windows functions to read the logfile into a string and send the string with mt4's sendmail()
To add comments, please log in or register