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

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

The indicator draws a channel using the High and Low values of a candlestick of a higher timeframe specified in the indicator input parameters.

The indicator draws the open level of a candlestick of a higher timeframe specified in the indicator input parameters.

Envelopes using the Color_PEMA_Digit MA, with an indication of trend direction and display of the last values of channel borders.

Envelopes using the Color_QEMA_Digit MA, with an indication of trend direction and display of the last values of channel borders.

The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones. The account type is taken into account, i.e. whether it is netting or hedging.

The Boa_ZigZag zigzag, with values displayed as fractal labels.

The Boa_ZigZag indicator with price labels of the ZigZag peak values.

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

The Expert Advisor trades based on signals generated by Stochastic Oscillator. Averaging. A limited number of positions. Trailing.

A simple system based on the crossover of two MAs.

The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones.

The indicator shows the statistics of the "Evening Star" pattern.

A redrawing channel with a colored background.

ZigZag with unusual properties

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

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

This is a trend indicator

The Exp_XROC2_VG_X2 trend-following trading system is based on the signals of two XROC2_VG indicators.

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

The Exp_XROC2_VG_Digit_Tm Expert Advisor trades based on signals generated by the XROC2_VG oscillator.

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

The EveningStar Expert Advisor trades the "Evening Star" pattern. Lot is calculated based on the risk value as a percentage of free margin.

The indicator shows the "Evening Star" pattern.

The class monitors the emergence of a candlestick

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

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

A moving average with the four-fold EMA averaging. It displays the most recent value as a price label with the possibility to round the indicator levels up to a required number of digits.

A moving average with the five-fold EMA averaging. It displays the most recent value as a price label with the possibility to round the indicator levels up to a required number of digits.

The EA trades based on the "Bullish and Bearish Engulfing" pattern.

The size of a candlestick. The size is calculated by the following formula: "minuend" minus "deduction".

The indicator displays Wingdings arrows when RSI crosses UP and DOWN levels.

A fractal based variation.

A fractal based indicator.

An indicator of ticks (Bid and Ask). Displays the last 300 ticks.

A moving average with the fourfold EMA averaging, with a real period and the possibility to shift the indicator horizontally or vertically.

A moving average with the five-fold EMA averaging, with a real period and the possibility to shift the indicator horizontally or vertically.

Plotting ROC indicators of two arbitrary same types (including Momentum) and periods in a single window.

The trading system is based on volatility compression

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

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

1...67891011121314151617181920...115