Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Access the CodeBase from your MetaTrader 5 terminal
Couldn't find the right code? Order it in the Freelance section
How to Write an Expert Advisor or an Indicator

MQL4 Source Codes of Libraries for MetaTrader 4

icon

Libraries are small sub-programs that can be used for developing new applications. They do not execute trading or analytical functions and cannot be run in MetaTrader 4. Their purpose is to simplify development of new applications in MQL4.

These applications can be downloaded and used in the editor of trading strategies MetaEditor.

Submit your code
latest | best

Many Expert Advisors (EAs) tend to close orders at the take profit level, considering the pip distance from the purchase price.

With these classes you can create and test your signals runtime.

Enables Programmers to create Martin Gale and Grid Trading strategies with ease.

Trade classes CTrade, CPositionInfo, COrderInfo, CSymbolInfo from MT5 rewritten for MT4

Adviser-Utility for copying transactions from one MT5 account or MT4 account to another MT4 account.

Adds the ability to automatically export the transaction history after running the Expert in the strategy Tester.

A customizable logging library with Debug,Info,Error logging levels.

Extension for the datetime with DayLightSavingTime adjustments.

A light header-only version of Log4mql that provides standardized logging.

A logging library similar to Log4j but for MQL.

Simple Script to disable the Autotrading for the EA on the chart. If you just want to use the DLL, check the code and comment/uncomment the necessary

Handy functions for comparison, rounding, formatting and debugging of doubles (prices, lots and money).

A cross platform library/framework

A simple way to manage graphical objects.

The library and iCanvas class simplify writing programs using Canvas.

This tool is for trading with keyboard input, it supports "Send order", "Set Stop Loss", "Set Take Profit", and "Close order".

Library for defining schedules by weekday and time.

A low latency container for working with ticks

Many developers need these functions, while working with different kinds of external APIs, like Bitcoin and altcoin exchanges where it is often necessary to send data with the confirmation of parameters validity through HMAC-SHA512, HMAC-SHA384 and HMAC-SHA256.

A fast library for combinations and permutations in MQL.

CEquityHstBar - library for showing the equity of EA back-testing by the offline chart.

Class for working with synchronization events.

Regular expressions provide a formal language for quick and flexible processing of texts. Each regular expression is a pattern (mask), for which the regular expression engine tries to find matches in the source text. A pattern consists of one or more character literals, operators, or constructs.

A class system to represent a hidden stop loss and take profit system, combined with 4 example files showing the use of the classes.

FileLog class for efficient logging at different Levels.

The header file contains functions and input variables for a time management.

Various helper functions for sending messages of different types to different sources.

This library has smart notification(alert, push and alert) function with an option of having a single notification per candle at a time.

Build Binary Options strategies to test in the Strategy Tester of MetaTrader 4 with Binary Options Strategy Tester utility from marketplace.

Byte-wise operation with structures and standard data types.

Elegant and nimble comparison of 'double' values of the "price".

Class for working with ticks in the MetaTrader 4. It is suitable for creating experts that make decisions on trading based on the analysis of tick data.

Rapid Application Development library.

A library of classes for creating a user-friendly interface of your programs.

OBz library of trading functions: position size, open, close position etc.

Fast time range checking function. Doesn't use slow string parsing.

Trading signals function. Based on the values of the CCI indicator.

Errors function. In Russian.

Based on the values of the OsMA indicator.

This is a conversion factor. It is used to detect whether broker is 4 or 5 digits. As MetaTrader 4 calculates everything using point basis, coder can use this function to convert pips to point for machine reading.

1234