Watch how to download trading robots for free
Find us on Telegram!
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 - 152


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

The OpenBuyPosition_X script is designed to buy at fixed values of Stop Loss and Take Profit in points from the current price. Position volume is determined on the basis of the level of losses.

Library to work with Skype.

The ergodic CCI.

The trend indicator drawn on the basis of a comparison of six levels of simple Moving Averages with High and Low of the current candlestick

Calculate Average Speed of price.

The Moving Average drawn on the basis of Gauss algorithm

The indicator which defines the moments when the market becomes asymmetric and there are strong trend changes

The trading system is drawn on the basis of the signals of the JMASlope indicator.

The channel is drawn using Gauss Transform

MPC is a script which measures (searches) the most frequently occurring candlesticks

There's a lot of Fibonacci indicators out there but I decided to make my own indicator for you.

The trend indicator which considers the market volatility

A trend, normalized oscillator drawn in the form of a histogram

A semaphore arrow signal indicator drawn on the basis of the EMA trend and reversal signals from crossings of the StepSto_v1 oscillator and its signal line

The channel drawn on High and Low prices of daily candlesticks

The speed indicator of price change smoothed by the JMA averaging.

A tape indicator which defines the market state using the AbsoluteStrength indicator

A typical and sufficiently smooth oscillator which can apply all oscillator analytical instruments

Volume indicator smoothed by the Laguerre filter

The indicator displays the situation when the direction of price movement and technical indicators does not coincide

A semaphore signal indicator for the moments when the trend force measured by the deviation of the price from the Moving Average is higher than a fixed limit

The Expert Advisor "catches" changes of the positions (opening, reversal, closing, triggering of Stop Loss and Take Profit) and depending on the configurations triggers the sound file, outputs alert or sends e-mail.

The indicator to determine the trend reversals on the basis of Bollinger Bands

The unnormalized oscillator using Fisher Transform

The "Fast ZigZag" indicator including the drawing of DiNapoli's target levels

The indicator uses in the calculation the deviation of its previous value from price

This indicator simply alerts and sends email every time the trend line touched by the price.

Two different period Moving Averages to define the direction of the trend and the semaphore signal indicator to specify the moment for settlement of a deal

Function to define the trend strength

The oscillator for intraday trading.

The smooth oscillator performed in the form of the color histogram

The indicator forecasts day's price range

A simple trend indicator.

The system of three signal indicators in one window

A typical Moving Average

Phoenix5 is Forex signal indicator which traditionally represents itself a set of pink and blue points

The oscillator that displays strengths of Buyers (Bulls) and Sellers (Bears) separately.

Trading system using the AsimmetricStochNR indicator.

The indicator to display time ranges

QQEA is Forex oscillator with an undistinguished name drawn on the basis of the Moving Averages and the RSI technical indicator.