Watch how to download trading robots for free
Find us on Twitter!
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 - 2

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

Lot sizing library. 29 money management options.

A set of functions to emulate the dynamic arrays.

Displays the levels of the current week!

Have you perhaps heard about the caterpillar? Here it is.... I do not remember where I got the code, I simply translated it from С++ to MQL4.

Library functions, get the HIGH LOW for the specified time interval

Set of standard functions for the YR1 timeframe.

This library is made for experts that need to calculate StopLoss and TakeProfit without putting SL/TP points on the trade.

This library made to simplify calculating your stop loss.

This library has SmartTrail trail function that depends on the previous candle.

It calculates the lot size depending on risk percentage entered by user in input parameters.

This library has two functions: first to count OP_BUY positions and second to count OP_SELL positions.

This library has two functions: BreakEven & TrailingStop.

This function calculates your lot size depending on definite conditions explained in input variables.

A simple function that creates a list of the available currency pair symbols.

Function library and Experts for trailing (11 types). Simple usage of complex algorithms.

The library for automated optimization of an EA during its operation.

This library allows you to write a text file with the quotes of the symbol in any place on your hard drive.

Additional functions for working with the datetime variables.

The Comment2 library expands the capabilities of the standard Comment function for comment output.

With the help of this library it is possible to implement the ability to maintain positions with a simple trailing stop in any Expert Advisor.

The library contains five functions for reading the values from an INI-file and five functions for writing the values to an INI-file. Thus, there are five pairs of functions to read/write the values of 'integer array', 'boolean', 'double', 'integer' and 'string' types.

The library is intended to implement the font list in the input parameters. The library contains 208 fonts.

The function returns the lot size, which is calculated based on the stop loss size and the risk specified in the variable.

The function closes all locked orders. This really saves money on the spread.

The function allows the execution of the specific code in the specified time interval.

MQL4 library that allows authenticating into a MetaTrader 4 account programmatically in release 880+.

FuzzyNet library for developing fuzzy models was written in C#. While converting to MQL4, 8 membership functions and 4 defuzzification methods for Mamdani-type systems were added to the library.

Simple way to control your orders.

Library provides functions for management of MetaTrader 4 to MySQL database connections. Fixed memory allocation and release problems of the original library.

Log4mql is an MQL4 library for flexible logging to files and the terminal console. It is modeled after the Log4j Java library.

Library to convert datetime to double and vice versa.

The header file contains functions for searching last and previous order in the trade pool.

The simple class for counting of the orders with different filters: by symbol of currency, Magic Number, either closed, either opened orders.

SendAdvancedEmail function for Metatrader 4 and 5 with HTML mailbody support.

The function will filter the trade positon. If the current time in the time you set, the function will return true.

Library to work with Skype.

The gSpeak dll for MetaTrader Build 6xx

Script Calling Library for MT4 build 600 and later

This is a Class for the new MQL4 that parses JSON. It requires the Hash.mqh class.

Simple library that allows sending requests via HTTP protocol from new MQL4

1234