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 Code Library for MetaTrader 4 - 18

The largest library features codes of free trading Expert Advisors, technical indicators and scripts. With the available applications you can trade in automated mode and analyze price dynamics. Use the library of codes to learn more about financial market sentiments.

Download free applications, test them and run in your MetaTrader 4. You can access them from the MetaTrader 4 platform and the MetaEditor development environment.

To post a new code, please log in or register
latest|best

Script for the calculation of the third Elliott wave

Indicates the number of periods for the calculation of the average line.

Through the use of more sophisticated smoothing algorithms this RSI has less delay and smoother shape of the curve.

The FanSimple displays the correctness of reversal of the moving averages fan on different timeframes. The indicator includes four moving averages with the values 5, 21, 55, 233, that are displayed on the chart.

The name of the indicator is left as it was: Plagiat. In the original version it was HMA.mq4 (based on a publication in ForexMagazine #104").

The currency indices indicator with the ability to calculate CCI, RSI, Momentum, MACD and Stochastic.

The CatFX50 is an easy and winning system, but it is not so simple. Be sensible and place stops at the distance of 34 pips.

Shows when to buy and when to sell. Position is opened when the indicator color changes: if there is a green dot - buy, if there is a red dot - sell.

Displays the situation when the directions of price movement and technical indicators do not coincide. This is mostly seen when the indicator reaches an overbought or oversold area (20;80).

The indicator displays the ranges. Useful for the visualization of various "zones".

Simple indicator with great potential for the analysis of data and its use.

Displays the difference between the long-term and short-term market sentiments relative to the price.

A solution for those who can not devote much time to the analysis of the current situation on the Forex market and to making correct and confident decisions, that are an integral part of online trading.

The LSMA is used for confirmation of counter-trend signals.

The Expert Advisor that gains profit from the positive swaps + multi-currency arbitrage tactics.

The Range indicator displays the index of the range expansion and is an oscillator for the market calculation.

Indicators for the "Chaos" trading system described in the third book by Bill Williams (Bill Williams and Justin Williams. Trading Chaos - Second Edition).

The ZZ_All Quotings 0-0050 script is designed for downloading history on all currency pairs, metals, known indices, CFD and for controlling "holes" in history.

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 Dealers Trade v 7.74 EA is based on the algorithm of multi-lot scalping. The EA has been repeatedly tested on a live account.

The Dealers Trade v 7.51 RIVOT EA is based on the algorithm of multi-lot scalping. The EA has been repeatedly tested on a live account.

The indicator shows direction of movement and rollbacks.

The awo Holidays EA reports the status of the next day: working day, weekend or holiday.

The history_data_analysis_v3 script checks the history for missing bars, determines the size of the holes, gaps and makes a list of them.

The hst2csv script is used for converting *.hst files to *.csv files, that can be imported into the MetaTrader 4 client terminal with no errors.

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

Example of using wininet.dll for downloading a web page.

A set of scripts for quick drawing the Elliott waves.

Universal trend utility for near predictions and making decisions by "stops" and/or "stops/reversals" of the orders.

The CurrencyChart indicator allows to display the charts of multiple currencies (symbols) in a single window.

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

The OsMACD indicator is a combination of the colored Moving Average of Oscillator(OsMA) and Moving Average Convergence/Divergence(MACD) indicators.

Additional functions for working with the datetime variables.

A simple indicator of the floating reference center and its nearest resistance and support levels.

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

A simple trend indicator that clearly shows the direction of the current trend. It can be used in the breakout trading systems.

The New Fractal Lines indicator implements not the "squat" bar, but the "squat" fractal and draws the fractal lines.

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.

1...111213141516171819202122232425...86