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

icon

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 smoothed Money Flow Index oscillator with the color indication of overbought/oversold level breakouts and of the histogram direction.

A semaphore signal indicator. Its code does not contain averaging algorithms.

The smoothed Larry Williams' Percent Range oscillator with the color indication of overbought/oversold level breakouts and of the histogram direction.

The smoothed Relative Strength Index oscillator with the color indication of overbought/oversold level breakouts and of the histogram direction

The XССXCandleKeltner indicator with the breakout indication option

The XRSXCandleKeltner indicator with the breakout indication option

The CDir class allows getting information about files and folders outside the MQL5 sandbox similar to the MS-DOS Dir command. Call of system DLL is used, therefore you should allow their use.

Returns position profit in points based on the trading history.

An example of determining the moment when a pending order has triggered.

Keltner Channel built relative to the average value of the XCCX oscillator as a sequence of candlesticks

The STD indicator with the timeframe selection option available in input parameters

The price chart speed expressed in points, with the author markup of significant price change levels.

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

The NRTR_ZigZag_Price indicator with the timeframe selection option available in input parameters

Keltner Channel built relative to the average value of the XRSX oscillator as a sequence of candlesticks

The Expert Advisor opens a deal in the breakout direction. Lot calculation depending on risk percent of margin.

An ExpertAdvisor based on the T3MA-ALARM indicator.

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

A simple oscillator that uses the difference between candlestick open and close prices.

Keltner Channel built relative to the average value of the OsMACandle oscillator as a sequence of candlesticks

An example of using HistorySelectByPosition (based on the HistoryDealGetTicket use example).

Support\resistance levels, trend direction — bullish\bearish.

Keltner Channel built relative to the average value of the MomentumCandle oscillator as a sequence of candlesticks

The indicator plots price channel and Fibonacci levels based on the latest NRTR_extr_ZigZag peaks

The indicator plots price channel and Fibonacci levels based on the latest NRTR_ZigZag peaks

The Expert Advisor increases the lot size after each of profitable deal, if it was preceded by losing trades. Martingale.

Short-term trends. Two iMA indicators, one iStochastic.

Precision trend (histo).

The newest version of the Precision Trend Indicator.

Detrended Synthetic Price in oscillator form.

Detrended Synthetic Price (bars).

Detrended Synthetic Price with histogram.

How many buffers does your indicator use? What's it calculating? Is it efficient? If you want to know what's going on behind the scenes, you'll now be able to.

DSL - DMI oscillator

ADXm (vertical/horizontal filter adaptive).

Example of Buy Limit & Sell Limit pending orders with Bollinger Bands.

Converts .set files from MT5 format to MT4 format.

Vidya zone using 3 prices for calculation.

A Keltner Channel drawn relative to the average value of the Larry Williams' Percent Range oscillator as a sequence of candlesticks

The NRTR_extr_ZigZag indicator with price labels of the ZigZag peak values.

1...808182838485868788899091929394...183