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 - 52

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.


Uses several indicators and candle patterns plus assesses trending or ranging market

The Expert waits the price to have a strong fluctuation of x pips in y minutes and then it opens a reverse position with a grid of limits position to reinforce it.

RSI with MA and Label value/phase indicator

Trading Robot

This indicator uses five different indicators from 6 different timeframes to give a signal.

This indicator shows some Support/Resistance lines. The number of lines is variable (max 6). The more support lines are, the stronger "bull" will be expected. It also displays entry signals.These signals may be often disappointing, but sometimes good.

Display risk/reward ratio in the chart (UPDATED)

This indicator is another implementation of daily pivot points that allows the time for pivot point calculation to be advanced or delayed from the server time. It considers any Saturday trading to be Friday and any Sunday trading to be Monday.

This code of Parabolic SAR doesn't make the errors when working together with the same second indicator located on the same chart.

The indicator of peak price values.

The divergences of the Stochastic, the continuation of the divergences topic.


The digital filter of the price.

The indicator of 2 МАs of different currency pairs in one window.

The trend indicator RAVI (Range Action Verification Index) invented by T. Chand.

It shows the levels: SPREAD and STOPLEVEL - the minimum allowed levels of the StopLoss/TakeProfit in points. It informs if these values are changed.

A signal indicator based on the signal from AO and AC - the changing of the hystogram color.

It is a simple indicator that consists of four trend lines that show the distance between the trend line and the price via the numbers and that give the signals when the price goes for the specified number of points.

The indicator draws the arrows at the intersection of the MA and the RSI of the 50 level.

Another Avocational Indicator by Hidden Divergence of OsMA.

A scalper by parabolic and Fibonacci.

The indicator applies Hodrick-Prescott low-frequency filter to predict future prices

The indicatorless system based on the analysis of 4 previous bars.

A package of libraries with the file functions for working without the limitations in any directories.

The function of adduction of the price to the correct form for the given symbol by means of rounding or discarding the excess.

The different colored snippets of MA are shown on the current chart depending on the direction of the MA moving at on the chosen timeframes, or they're not drawn at all if the moving on the chosen timeframes is differently directed.

EA is setup to use higher time frames for trend identification and lower time frames for entries/exits.

Indicator of the morning flat.

It closes an order by the intersection of two MAs (5 and 7 on default). Read the full description...

The indicators that can display several larger timeframes, japanese candlesticks and Fibo levels on a single chart.

Buy Sell Customized With RefreshRates and Lots Manager

The indicator draws the charts of the euqity and balance basing on the minute history. In such a manner you get more authentic picture of maximum rises and drawdowns.

An indicator that allows to see the "larger" periods (for example, half-yearly or yearly).

A practical EA for the intraday trading from 10:00 till 19:00. It works well on 5M EURUSD. The expected payoff is 40..60 pips per week on the forward testing.

The indicator line sharply changes its direction at the critical moments. It helps to identify the beginning of the trend.

The indicator calculates the correlation of the currency pairs.

A simple EA. It plays in the opposite direction on the specified difference between Bid and MA. It is considerably risky but it has own advantage.

The indicator of the Keltner's channel.

A standard ADX indicator with time frame setting.

An indicator of group moving. It shows the difference between two MAs in a separate window.