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

MQL5 Source Code Library for MetaTrader 5 - 62

This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.

You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.

latest|best

This indicator measures the (smoothed) distance in pips between the close and an exponential moving average.

This indicator measures the rate of change of AwesomeModPips indicator.

Tick Volume Indicator from the book "Momentum, Direction and Divergence" by William Blau, implemented in the form of a color histogram.

Moving average of ranges. The calculation is based on the price high and low for a period.

A Moving Average that includes price series processing by Gaussian filter.

The SimpleBars_Signal indicator shows information on the current trend using the values of the SimpleBars indicator with a fixed timeframe.

The KaufWMAcross indicator with the timeframe selection option available in input parameters.

The Exp_SimpleBars Expert Advisor is based on the signals of the trend indicator SimpleBars.

Another zigzag version with a simple code that correctly determines peaks.

The Exp_KaufWMAcross trading system is based on change of the trend direction displayed by the KaufWMAcross indicator.

The BvsB indicator with the timeframe selection option available in input parameters.

The Exp_BvsB Expert Advisor is based on the signals of the trend indicator BvsB.

The Exp_BnB Expert Advisor is based on the signals of the trend indicator BnB.

A semaphore signal indicator that uses crossing of a classical moving average with Kaufman's AMA indicator.

An indicator for trend following trading implemented in the form of a colored cloud.

A MetaTrader 5 indicator of short-term, medium-term and log-term extreme points created based on the book of Larry Williams "Long-term secrets to short-term trading".

The indicator draws candlesticks of a larger timeframe as color filled rectangles in accordance with the values of the SimpleBars indicator.

The RegressionPolynomial indicator with the timeframe selection option available in input parameters.

A semaphore signal indicator that uses the algorithm of crossing of two Moving Averages obtained from two consecutive averages.

A colored cloud using two consecutive averages of the price series.

The indicator displays the information about the time and account properties.

The ATR_Normalize indicator with the timeframe selection option available in input parameters.

A normalized true range by Larry Williams.

The indicator colors candlesticks based on the highs and lows of previous bars.

The indicator shows the power of bulls and bears.

A multi-currency trading system, based on Bollinger Bands and trend catching technique. Capable of trading up to 6 currencies simultaneously. System has build in optimization parameter sharing.

Simple indicator that shows when market is open.

This code allows you to set a maximum percentage of equity risk.

FxTrend 25EMA is based on the difference of the EMA 25 value during two different moments.

Show the aspect of two planets, the declination of planets or just the Body position.

This CExpert subclass allows to open only long/short orders, showing its usage with an MACD example.

When you drag this script onto the chart, it will calculate the price where you drop the script and use this price to figure out if a Sell Stop or Sell Limit pending order should be placed.

When you drag this script onto the chart, it will calculate the price where you drop the script and use this price to figure out if a Buy Stop or Buy Limit pending order should be placed.

A simple script that allows you to open a Short position using the current price location with a specified Risk Percentage and Reward Ratio.

A simple script that allows you to open a long position using the current price location with a specified Risk Percentage and Reward Ratio.

This Expert can run on all Symbols and Time Frames and uses the crossover of two Linear Moving Averages as Signal and an Exponential Moving Average as Trailing Stop.

The InverseReaction indicator with the timeframe selection option available in input parameters.

The Range_Rider indicator with the timeframe selection option available in input parameters.

The indicator of relations between the two true ranges by Larry Williams.

The MFIWithFlat indicator with the timeframe selection option available in input parameters.

1...555657585960616263646566676869...109