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

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 SAR Trading System illustrates the operation of the Stop and Reversal (SAR), developed by Welles Wilder. The Expert Advisor check for presence of an open position and starts moving the stop loss with parabolic acceleration.

Trading system based on Volume_Weighted_MA_StDev indicator signals.

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

Semaphore arrow signal indicator based on the classic Stochastic oscillator leaving the overbought and oversold areas, which features alerts, sending emails and push-notifications to mobile devices.

The Expert Advisor works both in normal mode with one positions, and in the HEDGE mode with multiple positions.

The Volume_Weighted_MA moving average which fills the chart space with a colored background.

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

Semaphore arrow signal indicator based on the classic Money Flow Index oscillator leaving the overbought and oversold areas, which features alerts, sending emails and push-notifications to mobile devices.

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

The Exp_Volume_Weighted_MA Expert Advisor is based on change of direction of the Volume_Weighted_MA indicator.

Semaphore arrow signal indicator based on the classic Relative Strength Index oscillator leaving the overbought and oversold areas, which features alerts, sending emails and push-notifications to mobile devices.

Semaphore arrow signal indicator based on the classic DeMarker oscillator leaving the overbought and oversold areas, which features alerts, sending emails and push-notifications to mobile devices.

Semaphore arrow signal indicator based on the classic Williams’ Percent Range oscillator leaving the overbought and oversold areas, which features alerts, sending emails and push-notifications to mobile devices.

The idea of this moving average indicator is in giving the bar with a greater volume a greater weight in averaging.

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

The Exp_FRASMAv2 Expert Advisor is based on change in color of the FRASMAv2 moving average.

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

A tool for measuring market volatility.

Adaptive Moving Average which uses fractals.

Indicator to identify the Harami patterns.

The iRSISign_HTF_Signal indicator shows a trend direction or a signal generated by the iRSISign indicator at the chosen bar as a graphical object with colored trend indication or deal direction. It also triggers alerts and plays audio signals.

The iWPRSign_HTF_Signal indicator shows a trend direction or a signal generated by the iWPRSign indicator at the chosen bar as a graphical object with colored trend indication or deal direction. It also triggers alerts and plays audio signals.

Trading system based on iDeMarkerSign indicator signals.

The iDeMarkerSign_HTF_Signal indicator shows a trend direction or a signal generated by the iDeMarkerSign indicator at the chosen bar as a graphical object with colored trend indication or deal direction. It also triggers alerts and plays audio signals.

The iStochKomposter_HTF_Signal indicator shows a trend direction or a signal generated by the iStochKomposter indicator at the chosen bar as a graphical object with colored trend indication or deal direction. It also triggers alerts and plays audio signals.

The iMFISign_HTF_Signal indicator shows a trend direction or a signal generated by the iMFISign indicator at the chosen bar as a graphical object with colored trend indication or deal direction. It also triggers alerts and plays audio signals.

The Exp_ColorX2MA_Digit Expert Advisor is based on the ColorX2MA_Digit indicator color change.

Semaphore arrow signal indicator based on the classic DeMarker oscillator leaving the overbought and oversold areas.

The Exp_ColorJFatl_Digit Expert Advisor is based on the ColorJFatl_Digit indicator color change.

Trading system based on iStochKomposter indicator signals.

The Exp_Chaikin_Volatility_Stochastic Expert Advisor is based on the Chaikin_Volatility_Stochastic indicator color change.

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

When analyzing the behavior of the Chaikin Volatility Index, the author of this indicator wondered how it would act if it is modified and if the stochastization process is applied to it.

Trading system based on iWPRSign indicator signals.

Hybrid of the FATL (Fast Adaptive Trend Line) digital filter and analog adaptive averaging JMA — the ColorJFatl indicator that fills the chart space with a colored background and displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits, as well as displays a price grid with those rounded values.

Trading system based on iRSISign indicator signals.

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

Trading system based on Directed_Movement_Candle indicator signals.

The Directed_Movement indicator implemented as a sequence of candlesticks.

The Exp_ColorRsiMACD Expert Advisor based on the signals taken from the ColorRsiMACD histogram.

1...313233343536373839404142434445...115