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

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

Simple code that illustrates trading based on the OnTimer event. When the timer triggers, the robot alternately performs buy and sell deals with fixed stop loss and take profit values.

Class for exchanging data between programs. It allows to pass structures of arbitrary size via the global variables of the terminal from one program to another.

The script displays the brief statistics for trading on the instrument over the specified period - the number of deals, profit, profit factor.

The script switches all opened charts at a certain interval. It is also possible to display only the charts of certain symbols.

The Standard Deviation indicator implemented in the form of a color histogram.

Moving average wing averaging of the linear combination of the input price timeseries.

Symbol for downloading the history data for the current symbol with indication of progress.

Script draws the Axel Rudolph levels

Normalized MACD.

Buy sell volume.

"Corrected" momentum.

"Corrected" velocity (smoother momentum).

Volume weighted average bands.

MACD ca - sort of a "step MACD" or "corrected MACD".

Corr RSI - "step" or "corrected" RSI.

Average using dr. Andreas Uhl's "correction method.

iCrosshairClickTarget indicator for MetaTrader 5 is an improved version of iCrosshair indicator for MetaTrader 4.

RSI(OMA) with automatic Fibonacci levels.

QWMA - the "CA" ("Corrected Average") version

Sentiment zone oscillator.

AdxVma trend.

Balance of market power (using improved Jurik filter for calculation).

PDFma — average using probability density function for average calculation.

Elliot oscillator indicator.

Recursive (double) smoothed stochastic - allows calculating double smoothed stochastic up to depth 15.

ExpBuySellSide is a MetaTrader 5 Expert Advisor based on the ATRStops and StepUpDown indicators.

ExpHAWaves is a MetaTrader 5 Expert Advisor based on the Heiken Ashi and StepUpDown indicators.

Stochastic of 7 possible types of RSI(oma).

NEMA - arbitrary depth EMA, DEMA, TEMA... DecEMA ...

MACD calculated using the NEMA.

The newest version of Adaptive Laguerre filter.

This version can use one of the 4 basic averages types for smoothing.

Adaptive Laguerre filter trend.

New version of non-repainting step stochastic indicator.

ExpPricePosition is a MetaTrader 5 Expert Advisor based on the PricePosition and StepUpDown indicators.

Correlations (Spearman or Pearson rank (auto)correlation) drawn as candles.

Awesome oscillator - extended version.

Support ressitance - Barry (extended version).

Holt's double exponential smoothing - the trend component.

Short description.

1...414243444546474849505152535455...133