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

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.

To post a new code, please log in or register
latest|best

The EA trades during two trading sessions, starting at the specified session beginning time. Stop Loss. Take Profit.

An assistant Expert Advisor. Only CLOSING positions.

Automated calculation of Stop Loss levels based on the ATR indicator.

The Expert Advisor uses three indicators: MA(150), RSI(3) with levels 80 and 20, Stochastic(6, 3, 3) with levels 70 and 30.

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

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

The EA uses the following indicators: CCI, fast and slow MA, Larry Williams' WPR.

The indicator implements a breakthrough system using the Color_PEMA_Envelopes_Digit channel.

The indicator implements a breakthrough system using the Color_QEMA_Envelopes_Digit channel.

A channel based on peaks and troughs of the Zigzag2_R_Color indicator.

A channel based on peaks and troughs of the ZigZag indicator.

A channel based on peaks and troughs of Boa_ZigZag

Trading strategy: the breakout of a High/Low in the selected time interval.

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

The indicator marks all performed trades with short horizontal lines.

Two ZigZag indicators are used for analysis.

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

1...414243444546474849505152535455...150