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

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

A trading system based on the XRSIDeMarker_Histogram indicator signals.

A trading system based on the 2XMA_Ichimoku_Oscilator indicator signals.

Indicator EMAVFS_StDev with the timeframe selection option available in input parameters.

The indicator plots four horizontal lines: Two basic ones (red by default) above the High and below the Low of the "Bar number" bar and help lines (green by default) shifted from the basic ones.

The Expert Advisor does not use any indicators. It only uses the current price and the OHLC of zero bar.

The EMAVFS indicator with additional trend strength indication using colored dots based on the standard deviation algorithm.

A utility for closing (reducing the right side of the length) the rectangles, trendlines, or lines with arrows to some bars/candlesticks.

Indicator EMAVFS_channel with the timeframe selection option available in input parameters.

The trading system is based on a simple neural network.

Indicator EMAVFS with the timeframe selection option available in input parameters.

A channel using a non-smooth and steady approximation error, in which the exponential moving average with a variable smoothing factor is used as the midline.

The EA determines the overbought (OB) and oversold (OS) zones, for which it generates trading signals for selling or buying.

Indicator StopLoss Calculator.

Indicator Trend Quality.

Indicator Price Cycle.

Indicator MI (Mass Index).

Indicator Arms' Ease of Movement Value (EMV).

Exponential moving average with a variable smoothing factor.

The Coppock Indicator of Bullish Signals.

Average Modified Moving Average.

Sherman and Marian McClellan Summation Index.

Sherman and Marian McClellan Advances/Declines Indicator.

Sherman and Marian McClellan Oscillator.

A script for showing the swap value on a financial instrument. The texts of positive and negative swaps are shown in different colors.

Trading on indicator Heiken Ashi Smoothed Oscillator. Settings for placing Stop Loss, Take Profit, and Trailing the positions.

Working with pending Buy Limit and Sell Limit orders. Trailing the positions is possible.

Sherman and Marian McClellan Ratio Adjusted Net Advances Indicator.

John Ehlers Modeling The Market Indicator.

An Expert Advisor based on indicator SAR.

A financial asset strength indicator as a candlestick chart.

The EA uses indicator Awesome Oscillator.

A trading system based on detecting the market volatility.

A trading system based on the KWAN_RDP indicator signals.

A trading system based on the KWAN_CCC indicator signals.

Placing Buy Stop and Sell Stop on the 5-minute timeframe.

A trading system based on the KWAN_NRP indicator signals.

Indicator XStdDevSpeed with the timeframe selection option in input parameters.

Smoothed standard deviation changing rate.

Indicator SSL2 with the timeframe selection option available in input parameters.

Two different-period indicators SSL, implemented as a colored cloud.

1...91011121314151617181920212223...137