This tool is a DLL library that can be used from any trading development application, such as MetaTrader and TradeStation.
As you know, MetaTrader4 has limited debugging capabilities. For complex system product development, it's simply one of the best debugging tools on the market. Currently, MetaTrader4 doesn’t support stop placements or line-by-line viewing. The only way to perform a debug is to display variables onscreen or to use the Print() and Alert() functions. However, since Alert blocks ticks, it can’t debug. Print can debug, but its output is inside the Terminal window (along with the outputs of every other process). To solve these issues, we developed an easier way with MetaTrader4 to debug Expert Advisors, Indicators, and scripts. MT4Logger is an effective tool that can simplify the entire process.
freeware, so users can embed it anywhere.
Installation may vary by application. DLL files must be placed in an application’s DLL include path or the Windows’ DLL include path; for example, the 64-bit shared library include path is
%windir%\SysWOW64. In MetaTrader4 (builds 0600 and below), the library path is
%MetaTrader4%\experts\libraries. In TradeStation, the include path is
You may need to enable DLL execution because it's sometimes disabled by default (for security reasons). This tool was released as a DLL, so you’ll need to enable DLL Execution.
This function initializes the logger and returns a handle. At same time, you can define the Channel Tab’s back- and foreground color. The channel parameter requires a string to manage the channel. A channel is the name of a tab inside the logger window
This function closes the handle. Use the inside deinit() function of MetaTrader4 to perform a cleanup. It’s recommended not to forget this function.
Use this function to clear the content of channels being handled (similar to the "Clear" button in LOGGER)
Here we can connect to the content. In defined colors, this function adds a line to LOGGER. If enabled, added lines will auto scroll with timestamps that follow the computer’s local time.
Using this function shows and hides the logger window. Setting the variable to 0 hides; setting to 1 shows.
||Download v107 (Metatrader Build > 520 supported)|
||Download v101 (Metatrader Build < 520 supported)|