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

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

This is a trend-following indicator using the moving average and its smoothing. It features alerts, emails and push notifications.

ZigZag based on the MomentumCandle indicator candles.

ZigZag based on the RSICandleV2 indicator candles.

The indicator displays the deviation of the upper and lower borders of the symbol oscillation range. The deviation is based on the symbol's ATR.

ZigZag with its values displayed as fractal labels.

ZigZag based on MACD histogram.

ZigZag based on Stochastic oscillator.

ZigZag based on WPR oscillator.

ZigZag based on RVI oscillator.

ZigZag based on RSI oscillator.

ZigZag based on MFI oscillator.

The script allows you to try regular expressions.

BB stops — RSI version.

Well known BB Stops (Bollinger Bands Stops) indicator with some additions and further adapting to MetaTrader 5 usage.

BB stops - stochastic indicator.

BB stops - velocity version.

The Kijun-sen line with color customization and sending alert on trend changes

Derivative of the moving averages difference.

The difference of the moving averages.

Arithmetic and geometric moving averages.

The ZigZag based on the iMomentum oscillator.

The ZigZag based on the iForce oscillator.

The ZigZag based on the DeMarker oscillator.

Trading system based on the signals of the MFI_Slowdown indicator.

Trading system based on the signals of the WPR_Slowdown indicator.

The indicator displays the Ask and Bid, which are taken from the real tick history. Also, it is possible to evaluate the spread changes by visually comparing the Ask and Bid.

The Trigger Line indicator with arrows.

It shows the tick price history (Bid/Ask) within all visible bars.

The ZigZag based on the OsMACandle oscillator.

The ZigZag based on the OsMA oscillator.

The ZigZag based on the CCI oscillator.

The ZigZag based on the Chaikin oscillator.

Semaphore signal indicator based on the WPR indicator, which features alerts, sending emails and push-notifications to mobile devices.

Semaphore signal indicator based on the MFI indicator, which features alerts, sending emails and push-notifications to mobile devices.

Trading system based on the signals of the RSI_Slowdown indicator.

Here are 6 classes, designed for convenient and intuitive use of indicators in your code.

Semaphore signal indicator based on the RSI indicator, which features alerts, sending emails and push-notifications to mobile devices.

The Exp_Delta_WPR Expert Advisor is based on the Delta_WPR indicator color change.

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

Derivative of the Cauchy difference The indicator shows the difference in the estimated values of the current bar and the previous bar.

1...383940414243444546474849505152...133