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

FileLog class for efficient logging at different Levels.

This script removes all instruments with spread higher than the specified maximum requested and it also removes all non-trade enabled instruments from Market Watch, which allows you to concentrate on items you may want to trade without all the clutter.

This indicator helps to move charts one by one to the the front, just like slide show,and make your hands free.

A channel based on standard deviation of close price.

This is a binary options simulated trading indicator on MetaTrader 4 client, novice traders can use to practice trading strategies, program interface have simplified Chinese and English.

Tipu MACD is one the popular indicators in the Market. The original code for Tipu MACD is modified by removing compatibility with Tipu Panel. This version of Tipu MACD is open for everyone who is interested in developing an Expert Advisor.

Test ChartEvent is an example demonstrating the various types of ChartEvent: keyboard keys events, mouse click & move events, custom events. The source code works both in MetaTrader 4 and MetaTrader 5.

Trailing stop allows you to automatically protect the profits with your positions. It adjusts itself according to the current market rate and the amount of pips you give it to trail behind.

This EA opens Buy or Sell trades in strongest or weakest pair. It cannot be backtested.

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.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283