Join our fan page
Log4mql - library for MetaTrader 4
- Views:
- 6466
- Rating:
- Published:
- 2015.07.06 10:51
- Updated:
- 2016.11.22 07:32
- Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Log4mql is an MQL4 (MetaQuotes MetaTrader 4 Language) library for flexible logging to files and the terminal console. It is modeled after the Log4j Java library.
Documentation (GitHub): https://github.com/swaypnet/Log4mql
Usage in your Code:
CLog4mql::getInstance().error(__FILE__, __LINE__, "Something unexpected happen");
or (for more frequent usage)
CLog4mql* logger = CLog4mql::getInstance(); logger.error(__FILE__, __LINE__, "Something unexpected happen"); logger.info(__FILE__, __LINE__, "Calcumation done"); logger.debug(__FILE__, __LINE__, StringFormat("The result of %s is %d", string1, value1));
Don't forget at the end of your EA/Indicator/Script:
CLog4mql::release();
or
logger.release();
Directories:
The directory for the log4mql.conf and the log4mql.log files
- Normal mode: <mt4datadir>/MQL4/Files/
- Test mode: <mt4datadir>/tester/files/
Log levels:
You can configure the required log level for output in the config file for each appending file and/or a global default.
- TRACE
- DEBUG
- INFO
- WARN
- ERROR
- CRIT
Exports CSV file to analyze trade history for a symbol.
Fibo For Yesterday and Last WeekUsing Golden Section Analysis of the market for yesterday and last week.
This indicator combines two groups of six exponential moving averages of different periods to elucidate the direction and the strength of the short-term and long-term trend.
Check Current Open Orders With ProfitThis script lists current open orders with profit.