Top libraries for MetaTrader 5 based on user ratings - 2
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
Logify is a logging library for MQL designed to simplify debugging, tracking, and monitoring of EAs and indicators. It provides structured, customizable, and organized logs directly on the chart or in the terminal, with support for log levels, flexible formats, and multiple handlers. A lightweight, elegant solution that is easy to integrate into your MQL projects.
Allow the EA to determine whether there are duplicate EAs on the chart based on conditions.
Include-file class that measures inter-tick latency, filters false alarms via a self-normalising ATR volatility gate, and broadcasts persistent lag alerts to other EAs via GlobalVariable IPC.
Institutional-grade forex session detection and analysis library for MetaTrader 5.
Institutional risk analysis library for MetaTrader 5. Zero external dependencies. Pure MQL5 mathematics.
ASQ Order Executor — Institutional order execution wrapper for MQL5 EAs ASQ Order Executor provides institutional-grade order execution with automatic retry logic, slippage monitoring, partial fill handling, requote management, and comprehensive execution statistics. Drop it into any EA for production-ready trade execution.
A daily process writes "today's decision" (which strategy runs, or FLAT) to a file the EAs read at the open. One day the writer did not run. The EAs read yesterday's file, compared its date with TimeCurrent() - the server clock, which had stepped back to the previous day overnight - saw a match, and traded all morning on a 24-hour-old decision. No error anywhere. Two rules, both in this class: 1) staleness is judged against TimeLocal(), which always moves forward; TimeCurrent() is the last tick's stamp - it freezes without ticks and can step back on reconnect. 2) When in doubt the answer is FLAT: missing file, bad date, wrong day, empty line - every failure path returns "do nothing", and each is logged ONCE per state change, not on every tick and not never. File format: line 1 = ISO date, line 2 = decision string. The demo writes a fresh, a stale, a malformed, an empty and a missing file, and shows that only the first is allowed to trade.
A lightweight, OOP-compliant MQL5 header class (.mqh) for accurate pip value calculation and dynamic lot sizing across all instruments, featuring automated cross-currency rate conversion and broker volume normalization.
Position size from a risk amount, computed from the symbol's real tick value, tick size and volume step rather than an assumed pip value. It always rounds volume down, and when your risk is smaller than the minimum lot it says so and reports what that lot actually costs. No terminal state, so the sizing logic is testable offline - a 41-assertion test script is included.
A small include file for Expert Advisors and trade managers. It turns your risk rules into yes/no answers: how many lots does this stop allow, is the daily loss limit reached, is the maximum drawdown (static or trailing) reached, how much is at risk across all open positions, and are spread and session acceptable. The lot is never rounded up: if the broker minimum lot would risk more than allowed, the trade is skipped and the reason is returned. Limits survive a terminal restart. The library only measures: it sends no order. Includes a demo account guard (no trading by default) and a self-test with 78 checks.
The library reconstructs a complete MQL4-style order model on top of the native MQL5 Position, Order, Deal, and History APIs. This design allows legacy MQL4 Expert Advisors to operate with minimal code changes while preserving MQL5.
Calculates the Strategy Tester report statistics from the deal history, including Z-Score, AHPR, GHPR, LR Correlation and LR Standard Error, which TesterStatistics() does not return. Checked value by value against the tester.
Reads a Strategy Tester report saved as HTML into its deals, closed trades, net profit and balance drawdowns, for comparing, combining or exporting backtests.
A lightweight tab bar for chart panels, drawn with the standard CCanvas class. One include file, several independent instances per chart, click selection, resizing and safe cleanup. Includes a demo Expert Advisor.
This EA is a demonstration of how you can implement your own Hedging strategy with the help of the include file.
This code provides a simple function for sending push notifications to your mobile device whenever trades are opened or closed in MetaTrader 5. It's designed for netting accounts (where only one position per symbol is allowed).
A class for reading and writing individual bits or bit sequences to and from a buffer.
Unpack GZIP archives from *.gz files or responses from sites compressed with this format.
Technical Details Uses MQL5's OrderSend with TRADE_ACTION_DEAL for instant market closure at current Bid/Ask prices. Includes slippage tolerance (10 points), proper volume matching, and magic number preservation. Loops backward through positions to prevent index shifting during execution.
This Script & EA enables coders to backtest their news based strategies which use the MQL5 Calendar.
A logger with the ability to log specific modules or code sections
Include class that validates combined terminal ping + execution latency before trade operations. Returns false if threshold is exceeded.
The CDebugLogger class is a flexible and comprehensive logging utility designed for use in MQL4/5 environments. It allows developers to log messages at various levels of importance (INFO, WARNING, ERROR, DEBUG) with options to include timestamps, function signatures, file names, and line numbers in the log entries. The class supports logging to both the console and files, with the ability to save logs in a common folder and in CSV format. Additionally, it offers functionality to silence logs based on specific keywords, ensuring that sensitive information is not logged. This class is ideal for developers looking to implement robust logging mechanisms in their MQL4/5 applications, with customizable features that cater to a wide range of debugging and monitoring needs.
A hybrid sorting algorithm that provide fast performance for sorting arrays of simple types, structures or object pointers.
Constructor for creating histograms of statistical distributions of indicators, timeseries and their derivatives.
Static class to fix the TimeGMT() function during testing in the strategy tester.
Calculate the cosine distance and similarity between 2 vectors . The cosine distance is 1-cosine_similarity and the cosine similarity is the dot product of two vectors by their magnitudes multiplied.
The simplest class for logging in MetaTrader 5 with support for levels, message format, include and exclude filters on substrings.