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

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.

latest|best

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.

PriceAction indicator based on indicating Price Action candles. It indicates each candle type by different colored histogram bars.

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.

This Expert Advisor depends on Moving Average 400 to indicate trend and "slope-direction-line" indicator, it will be attached with EA.

Buy and Sell arrows for Alligator signals.

This indicator will write value degrees of the lastest position of Price / MA / WPR / RSI / Stochastic at the current Timeframes.

Expert Advisor created using hedge function and the moving average indicator.

Show multi timeframe Moving Average on one chart.

Expert Advisor based on Commodity Channel Index (CCI) indicator.

Harami slightly modified.

This is my first expert totally based on RSI.

Simple and clean panel that shows RSI values on all timeframes with Oversold and Overbought notification.

Click "Close All" button to close all your open & pending orders at once.

Roboost is an EA for MetaTrader 4 trading using several half-scalping and traditional trade management techniques. It shall work on different pairs and TF. Target is H1 for major pairs.

The multi-currency arbitrage tactics.

This tiny script visually demonstrates the identity of two common Moving Averages

Displays what was reached first - Low or High for the current bar.

An example for my yet unpublished article. An easy template for writing custom experts.

The trend strength(phase) indicator.

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.

The idea of the indicator is to select each currency from currency pairs separately. The currencies are measured in relative units (points). The sum of all currencies at any given time is equal to zero.

Displays the overbought or oversold states of the currencies relative to each other.

Chandelier Exit calculates the trailing stop based either on the maximum value of the maximum price or the maximum value of the close price over a specified period.

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 demonstrates the trend stops with multicolor dots. In order to distinguish the targets the BrainTrend2Stop uses Blue and Red dots.

The indicator demonstrates the trend stops with multicolor dots.

The Avg Daily Range indicator.

The script helps to perform the visual analysis of multiple currency pairs on a custom time frame.

A simple indicator that demonstrates the general principle of displaying multiple indicators from different timeframes in a single window

Small indicator for monitoring the history of closed and the status of open orders on the chart. Red - unprofitable order, green - profitable.

Belongs to the Pivot group.

Calculates the pivot point.

A version of the Stochastic located right in the price window.

ZigZag with unusual properties (specify the length when plotting).

An interesting attempt to make levels based on ZigZag values. This indicator is strongly recommended for those who can not "feel" the market. The indicator gives a very clear view of the market.

An attempt to combine ZigZag and ATR. And to use it for determining the trend phase.

Gann angles inscribed in ZigZag.

1...789101112131415161718192021...84