I have a DLL that contains a few functions that I call from my EA. The functions contain printf statements for debugging purposes, but even though I know the functions are being called successfully, I can't see any output from the printf statements.
Where do these get written to?
They get written to the application's console, if it has one. I can't think of any (trivial) way of trapping this output other than starting terminal.exe with the standard syntax for piping console output to a file. For example:
terminal.exe >consolelog.txt
For reasons which are slightly obscure, this has the side-effect of preventing MT4 from logging on automatically at startup.
If I were you, I'd replace the use of printf() with something which logs information in a file. The next-most-simple alternative involves creating a console for the GUI app before you call printf(), and then redirecting STDOUT.
They get written to the application's console, if it has one. I can't think of any (trivial) way of trapping this output other than starting terminal.exe with the standard syntax for piping console output to a file. For example:
terminal.exe >consolelog.txt
For reasons which are slightly obscure, this has the side-effect of preventing MT4 from logging on automatically at startup.
If I were you, I'd replace the use of printf() with something which logs information in a file. The next-most-simple alternative involves creating a console for the GUI app before you call printf(), and then redirecting STDOUT.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have a DLL that contains a few functions that I call from my EA. The functions contain printf statements for debugging purposes, but even though I know the functions are being called successfully, I can't see any output from the printf statements.
Where do these get written to?