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


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.

Submit your code

XBullsBearsEyes_Vol indicator shows direction of the histogram bars movement using colored icons on these bars

XBullsBearsEyes_Vol indicator with the timeframe selection option available in input parameters

The indicator displays a horizontal price line. Its parameters are set when the indicator is launched by a trader. The line defines the signal trigger level. Its breakthrough activates signals accompanied by emails and push notifications.

XBullsBearsEyes_Vol_Direct indicator provides alerts, sends email and push notifications at the incoming trading signals

JMACandleTrend indicator with the timeframe selection option available in input parameters

Fan WRSI indicator

ADX Trend indicator


EWO indicator

InvestorsVsSpeculators indicator

At the specified hour, the Expert Advisor analyzes OHLC of the previous bar and sets pending orders

Investors vs Speculators Delta indicator

Deviation from MA indicator

Deviation from MA oscillator indicator

RSI Divergence indicator

RSI of MA indicator

The indicator paints candles going beyond the Hans_Indicator_x22_Cloud channel expansion.

The trading system based on XBullsBearsEyes_Vol indicator signals

The trading system based on XBullsBearsEyes_Vol_Direct indicator signals

This utility Expert Advisor works with a virtual stop loss and take profit. Trailing positions on the current symbol.

Smoothed Momentum indicator

SuperTrend indicator

TMACD indicator

Expert Advisor based on iAO (Awesome Oscillator, AO)

Double Top indicator

Elder Impulse System indicator

GHLA indicator

Gann HiLo Activator/SuperTrend Bar indicator

Linear regression slope indicator

The HLCrossSigForRSI is considered as a trend indicator since it is intended for "catching" trends. However, it's a pretty complex and informative indicator that allows excluding the psychological and emotional effects from trading

XBullsBearsEyes_Vol_Direct indicator with the timeframe selection option available in input parameters

The indicator of expanding time zone corridors with the background color filling and the channel Hans_Indicator_x22_Cloud_System average line. The indicator provides alerts, sends email and push notifications when the formed corridor expansion is broken.

Position volume calculation based on trading history. The Expert Advisor applies iCCI (Commodity Channel Index) and iMA (Moving Average) indicators. Trailing is present as well.

Volatility bands

Normalizied MACD - self adjusting signals

BB stops - Hull average based with multiple stops included

Phase change index 2

Trend intensity index

This is the trading signal of PullBack and Candle. The expert code for this strategy is automatically generated by the MQL 5 wizard.

Trend detection index

Trend continuation factor - averages pre-smoothed (filtered)