Download MetaTrader 5

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

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.


This indicator shows when to open and when to close by drawing 2 lines.

The "Camarilla Pivots" indicator. The ideal indicator for those who like to work "by levels". It clearly shows the reversal level, support/resistance levels for the current day.

The indicator that facilitates the interpretation of the Ichimoku signals.

The indicator calculates the indices of the USD, EUR, GBP, CHF, AUD, CAD currencies and displays the index specified in the parameters in a separate window.

MACD2 generates bearish signals from three main sources. These signals are a reflection of the bullish signals - negative divergence, bearish intersection of the moving averages, bearish intersection of the center line.

The indicators that perform the chart ruling.

Linear regression is a mathematical method for determining the linear dependence between the variables. This technique is often used by analysts to identify the trend based on the time and price data.

The indicator of dynamic resistance/support level with a fixed channel.

In the case of weighted moving average, the latest data is of more value than more early data. Weighted moving average is calculated by multiplying each one of the closing prices within the considered series, by a certain weight coefficient.

The indicator shows the price points of reference.

Fast adaptive trend line is an estimate of the trend line.

The Jurik Moving Average indicator. JMA's improved timing and smoothness will astound you.

Useful for those who use the DeMark TD lines in trading. It draws TD points, plots TD lines, calculates the current values of TD lines, calculates the targets.

The indicator shows the fractals of different time periods on one chart (with different colors). Only М15, Н1, Н4, D1 are used.

The Hi/Low indicator shows how close the current value of the parameter is to the minimum and maximum values over a certain time interval.

It is not recommended to open a position when the histogram is red. If all indicators give entry signals, the final check is done according to this indicator. The histogram must be green.

Based on the use of a slightly modified Hull Moving Average (HMA).

Set of standard functions for the YR1 timeframe.

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

The indicator draws the slow and fast ССI and colors bars for determining patterns and trends.

The indicator allows the trader to understand market relations.

The indicator displays the number of ticks inside the candlestick.

When the stochastic enters the overbought or oversold area, the first lot is opened, if the chart is reversed, then operate with one lot.

The new version of the Mc_valute_v8_final EA. It works well on a flat market.

The unique FX_FISH indicator is widely used by the Western experts to trade in the foreign exchange market, stock market, and others.

Plotting principle - digital filtering.

(Fast Adaptive Trend Line)– the «fast» adaptive trend line is calculated using a digital low-pass filter with a small cutoff period.

A simple indicator of dynamic support and resistance levels.

The Lines_Create script creates 2 horizontal lines on the chart with the names UP_LEVEL and DOWN_LEVEL. The Lines_Delete deletes the lines created by the Lines_Create script from the chart. The Lines_RASST script is an addition to the Lines_Create script.

This script is designed for obtaining various statistical data on the chart candlesticks on the selected timeframe.

2 scripts for the analysis of trading results. Useful both for investors and traders.

The calculator estimates the value of one point of a currency pair and the maximum stop loss for the user-defined lot.

System concept: The Donchian Channels are quite popular among the trend following systems.

The operation logic is as follows: Once a local maximum\minimum has been determined several horizontal lines will be drawn. The white one is an entry point, the following lines in its direction are targets. Naturally, the first one is the most reachable.... Red line is a stop line.

This indicator is a conversion of the Darma indicator set from MT3 to MT4.

Originally the DT mode was used by klot in his DT-ZigZag.mq4 indicator.

The "Directional Movement" (+/-DM) indicator. Developed by Wilder to improve the PTP indicator.

The EA was created similarly to EA that won the first place in the championship.

This indicator help you keep 3 different timeframes on the screen to see the price action clearly on both short term and long term without switching buttons.

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