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

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

Four different CCIs combined into a "candles" display of CCI.

Combination of 4 RSI values (RSI of High, Low, Open and Close) displayed as candles with additional option to enable prices pre-smoothing prior to be used in calculation, which makes it an RSI-of-MA combination.

This is a RSI of High, Low, Open and Close displayed as color candles in it's own sub-window.

Trend Envelopes variation of RSI indicator.

Trend Envelopes indicator is using only % deviation for calculation and that is the only parameter needed for calculation. It is internally using Close, High and Low price and in this version that can not be changed. Also, due to the nature of the indicator, it can be easily be used as a sort of support/resistance indicator.

This version of ADX instead uses different display in order to make that as easy as it can be. The ADX values are easily comparable to the significant level, the the color of the ADX value and histogram clearly shows the trend. That way it is easier to follow the ADX trend(s) and values.

EMA_WMA - Expert Advisor for MetaTrader 5. Intersection of two iMA (MA). Position trailing.

The Expert Advisor waits when the lines of MA(10), MA(20), MA(50), MA(100) and MA(200) get arranged one above the other (or one below the other).

An Expert Advisor based on a random number generator. Trend is determined using the iMA (Moving Average, MA) indicator.

A script calculating the distance between a point and a line.

The Expert Advisor trades using levels. It can have a maximum of two positions of each type (Buy and Sell) in the market.

A weighted CCI.

A portfolio EA for the MOEX FORTS market.

An indicator of trend strength.

A smoothed RSI.

Divergences of the Repulse oscillator.

An indicator of possible price "rebounds".

The Overbought/Oversold Index

The Performance Index indicator.

A Moving Average with the smoothing type by Mark Jurik.

An indicator of important extremums.

A trading system based on the Donchian Channel indicator.

Integral of Linear Regression Slope (ILRS MA).

An indicator of the dominant direction of closing of bars.

Triangular Moving Average.

An indicator of StopLoss levels.

An indicator of current support/resistance levels.

RMO

The tend indicator: Rahul Mohindar Oscillator

Regularized EMA by Cris Satchwell.

Smoothed Positive Volume Index

Universal trailing of positions and pending orders.

An indicator of StopLoss levels.

Least Square Moving Average - a moving average calculated by the least squares method.

Instantaneous Trendline by J. Ehlers.

HMA

Alan Hull's Moving Average is a non-lagging moving average.

Polynomial interpolation.

Crossover of two iMAs (Moving Averages), one more iMA (Moving Average) is used as the filter. Lot: manual or risk percent of balance. Stop, Market or Limit orders. The EA also sets Stop Loss, Take Profit, Trailing Stop.

Pending Buy Stop and Sell Stop orders. The EA trades in the specified time period. Determines the highest and lowest prices in the specified range of bars. Position trailing.

The Volatility Band 2 indicator is similar to the standard Bollinger Bands, and is a modification of Volatility_Band with the following difference: instead of a separate 'Low band adjustment', this parameter affects both the lower and the upper bands of the indicator.

Volatility Bands

1...585960616263646566676869707172...183