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

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 expert will copy a trade with the preset volume on the same account, can be used with a signal. No cross-account functionality.

Automatic Fibonacci with ZigZag Base.

Example of Heiken Ashi Using Multi Time Frame (MTF).

RSI accumulated (floating levels).

Forex indicator for MetaTrader 4 with show double line of linear regression with position degrees and trend alerts.

This script is used to modify StopLoss and TakeProfit.

This EA Opens a grid of Buy Stops and Sell Stops at a specified distance from price. Has Stop Loss, Take Profit and Trailing Stop.

Laguerre RSI with Laguerre filter.

The header file contains functions and input variables for a time management.

The Proper Bot is for those who like Martingale style trading. Features: Stop Loss, Take Profit, Trailing Stop Loss functions. All are calculated in POINTS.

Precision trend (histo) - MetaTrader 4

Precision trend for MetaTrader 4.

Detrended Synthetic Price (oscillator).

Detrended Synthetic Price (bars form).

Detrended Synthetic Price (histogram form)

Experimental indicator I wrote for myself. It's made to show some reference (it's more like a rifle scope, than a rifle). Main components are pip scale, ATR/pivot, MA level, RSI, and spread alert. Can be used on any timeframe, but since it's made for scalping it is somewhat adjusted for M1-M15.

Various helper functions for sending messages of different types to different sources.

One of the best indicators about with a slight tweak to make it less noisy. Shows ZigZag lines to help spot cycles and draws Fibonacci lines to indicate support and resistance levels.

DSL - DMI oscillator

This indicator detects the currencies in the chart and compares the current close value in all the pairs of the currencies trying to understand if the currency is strong or weak.

This script scans for open orders and sets a fixed stop loss and take profit to all of the relevant.

This indicator can show you the weekly/daily/hourly/... progress on a lower timeframe. High, low, middle and/or open-lines can be configured individually.

A script used to submit market or pending orders with take profit and stop loss levels, lot size, and optional trailing stop.

Vidya zone (metatrader 4).

Schaff trend cycle - adjustable smoothing.

Quantile bands.

Dsl (discontinued signal line) - stochastic.

Dsl (discontinued signal lines) - RSX

Dsl (discontinued signal lines) - MACD.

Dsl (discontinued signal lines) - RSI (MetaTrader 4).

NonLag smoothed inverse fisher transform of RSX.

Small Expert which sends email notification of last opened and closed order.

This script allows you to close orders with one click, filtering by profit, loss, magic number and comment.

OpenOrder script allows you to open an order defining the % of balance to risk, the Stop Loss distance in pips and the Take Profit distance in pips and a magic number.

Open positions in MT4 with absolute control of the risk / reward ratio, automatically calculating the lot size.

Expert Advisor which trades breakouts in several pairs during the London Session.

By using this indicator you can see the normalized price of any chart!

Displays current bid price and % change of (open price of) current bar or X previous bars, also High, Low, and range.

Automatically draws Fibonacci retracements on chart.

Example of a simple breakout trading robot. There are a lot of breakout methods, but this is the simplest one as I think. Please see the attached images to visualize what is the breakout trading...

12345678...82