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

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 channel_breakout_entry indicator with the timeframe selection option available in the input parameters.

The indicator paints candlesticks depending on the minimums and maximums of the previous bars.

The Exp_CHOWithFlat Expert Advisor is based on the change of color of the CHOWithFlat indicator.

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

The Exp_TriXCandle Expert Advisor is based on the change of color of the TriXCandle indicator candles.

This is a market sentiment indicator. It displays market sentiment — bullish or bearish.

This script closes all windows of selected symbol or all windows of any symbol.

Change in the display of graphical objects created by the strategy tester and simplification of the following visual analysis of the results.

The Exp_FrAMACandle Expert Advisor is based on the FrAMACandle indicator candlestick color change.

The indicator draws FrAMACandle indicator candlesticks of a higher timeframe as color filled rectangles using DRAW_FILLING buffers.

The indicator draws TriXCandle indicator candlesticks of a higher timeframe as color filled rectangles using DRAW_FILLING buffers.

The Fractal Adaptive Moving Average indicator implemented as a sequence of candlesticks.

The TriX indicator implemented as a sequence of candlesticks.

The Exp_MA_Rounding_Candle Expert Advisor is based on the MA_Rounding_Candle indicator candlestick color change.

The indicator draws MA_Rounding_Candle indicator candlesticks of a higher timeframe as color filled rectangles using DRAW_FILLING buffers.

The indicator draws averaged candlesticks of a larger timeframe as color filled rectangles using DRAW_FILLING buffers.

The MA_Rounding indicator implemented as a sequence of candlesticks. Candlesticks appear as a result of relevant price timeseries processed by the MA_Rounding algorithm.

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

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

The Chande Momentum Oscillator indicator implemented as a sequence of candlesticks.

The Exp_ColorZerolagDeMarker Expert Advisor enters the market when the ColorZerolagDeMarker indicator cloud changes its color.

The Exp_ColorSchaffJCCXTrendCycle Expert Advisor is based on the ColorSchaffDeMarkerTrendCycle change of position relative to the overbought and oversold levels.

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

The LSMA_Angle_ indicator implemented as a sequence of candlesticks

The Schaff Trend Cycle indicator based on the difference between two DeMarker oscillators with different periods

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

This variant of DeMarker oscillator is calculated based on five DeMarker indicators

The MultiDeMarkerTrend_x10 indicator shows information on the current trends using the DeMarker oscillator position from then different timeframes

A variant of the DeMarkerTrend_x10 indicator with the option to individually customize the input parameters for each DeMarker oscillator which are used to display the current trends

The DeMarkerTrend_x10 indicator shows the DeMarker oscillator position from ten different timeframes

The Exp_LSMA_Angle Expert Advisor is based on the LSMA_Angle histogram breakthrough of the overbought and oversold levels

The LSMA_Angle indicator with the timeframe selection option available in input parameters

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

A variant of the StochasticTrend_x10 indicator with the option to individually customize the input parameters for each Stochastic oscillator which are used to display the current trends.

A variant of the MFITrend_x10 indicator with the option to individually customize the input parameters for each MFI oscillator which are used to display the current trends

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

A semaphore signal indicator based on crossovers of the main and the signal lines of the LinearRegSlope_V2 indicator

A semaphore signal indicator based on crossovers of the main and the signal lines of the LinearRegSlope_V1 indicator

The Exp_LinearRegSlope_V1 Expert Advisor enters the market when the LinearRegSlope_V1 indicator cloud changes its color.

The LinearRegSlope_V2 indicator with the timeframe selection option available in the input parameters

1...444546474849505152535455565758...115