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

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

An Expert Advisor based on the "Fractals at Close prices" indicator.

The Keltner channel with customizable calculation parameters.

The VR Alert NT5 indicator warns the trader about the price reaching a specified level.

A modification of standard fractals: only Close prices are used for calculations.

The Expert Advisor is based on the channel indicator Price_Extreme_Indicator.

The indicator shows the price increment of eight symbols in one window.

The indicator draws a channel of a trading day in the form of a cloud.

Dynamic Moving Average.

The indicator draws a channel based on the value of the breakout of channel levels.

The indicator draws the Donchian channel.

The indicator draws the opening price of the day. It works on timeframes up to H1.

The indicator calculates the ATR value based on the minimum price differences of the current and previous day, taking into account the volume of the current day.

The indicator allows displaying on a chart eight Moving Averages with the same averaging methods and calculation prices, but with different periods.

The indicator draws a channel at candlestick extreme prices.

The indicator draws daily candlesticks with extended parameters. It only works on the D1 chart timeframe.

The indicator shows the difference between two Moving Averages in the form of a colored histogram drawn in a separate window.

The indicator marks on a price chart candlesticks, which are larger than the specified size. If the candlestick size exceeds the value specified in the indicator parameters, the indicator can show an alert message.

Unlike the standard Fractals, this indicator allows searching and displaying on a chart fractals with the user defined dimensions.

It is a further development of the first VR---ZVER version. The new version features trailing stop, a separate flag for allowing/prohibiting BUY positions, a separate flag for allowing/prohibiting SELL positions.

An assistant EA for manual trading. Sets Stop loss, Take profit, moves positions to breakeven and applies trailing.

The SAR indicator calculated based on the iMA (Moving Average, MA) indicator values.

A trading system based on the ZigZag indicator.

Modified iCCI (Commodity Channel Index, CCI) - color highlighting of zones above the UP level and below the DOWN level.

The EasyAndFastGUI library allows creating graphical interfaces for custom MQL programs.

VR Orders History MT5 Lite - a script for downloading trading history in the CSV format.

A trading system based on ColorJJRSX indicator signals with the possibility to set a fixed position holding time.

The ColorDerivative indicator with the possibility to change the indicator timeframe in its input parameters.

The Internal Bar Strength indicator implemented in the form of a colored histogram.

The SVS_Trend indicator with the possibility to change the indicator timeframe in its input parameters.

The indicator marks candlesticks with colored arrows if candlesticks of a higher timeframe selected in input parameters are higher or lower than previous candlesticks.

Buy or Sell signals are generated when the price is above iMA (Miving Average, MA) with a very large period. As the number of open positions increases, the distance between trades (during which entry signals are skipped) also increases. The EA trades in the specified time interval.

The AroonOscillator indicator implemented in the form of a color histogram.

A trading system based on ColorJFatl_Digit indicator signals with the possibility to set a fixed position holding time.

Two identical trading systems based on the change in the color of the XDidi_Index_Cloud indicator cloud for long and short trades, which can be configured in different ways in one Expert Advisor.

The Expert Advisor allows checking the potential profitability of the ZigZagLW Addition indicator.

An Expert Advisor based on the "Arrows&Curves" indicator.

Two AdaptiveRVICloud indicators from different timeframes on one chart.

Two "Didi Needles" indicators from different timeframes on one chart.

Martingale based Expert Advisor specially designed for small deposits.

The Expert Advisor uses three iMAs (Moving Average, MA), one iOsMA (Moving Average of Oscillator and one iRVI (Relative Vigor Index, RVI). Trailing stop is based on the High/Low of earlier bars.

1...252627282930313233343536373839...141