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

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
DMX

Indicator DMX (Bipolar DMI) is calculated using the standard indicator ADX. However, as compared to that, it displays data as an oscillator with a signal line, and has shorter delay.

CA

Indicator CA (Corrected Average), also known as Optimal Moving Average. The benefit of the indicator is the fact that the current value of the timeseries must exceed the current threshold that depends on volatility for the indicator line to follow the price, avoiding false signals in the trend.

ASO

Indicator ASO (Average Sentiment Oscillator) displays the general market climate.

This indicator calculates the index of a given currency, using the USD index. It is based on indicator SymbolX, but four prices are used for calculations: OHLC instead of just one Close price.

This indicator calculates the index of a given currency, using the USD index. The Close prices of six currency pairs are used to calculate the index.

A candlestick-based chart based on histograms Ang_Zad_C_Hist calculated on the Open, High, Low, and Close timeseries of the price chart.

Indicator Atr Lite calculates the average price motion

Candlestick size and shadow analysis. In OnTradeTransaction, opening (DEAL_ENTRY_IN) and closing (DEAL_ENTRY_OUT) the positions are intercepted, as well as closing by Stop loss (DEAL_REASON_SL).

An unorthodox approach to indicator MACD: The EA calculates the indicator's area displayed above and below zero line.

A trading system based on object Fibonacci Lines (OBJ_FIBO) and on indicator Resistance & Support

ADX trend smoothed - multi time frame

ADX trend - smoothed

Variation of a well known Pivot indicator showing pivot lines in a separate window and price position relative to those pivot lines.

Pivot oscillator - averages

RSI of JMA

RSI (var) using Jurik MA

A histogram based on the difference between the main and the signal lines of indicator Ang_Zad_C in the points of the price chart.

A trend-following indicator of the main and signal lines, drawn as a color cloud.

Indicator AbsolutelyNoLagLwma_Digit_Cloud with the timeframe selection option available in its input parameters.

Indicator XPeriodCandle_main with the timeframe selection option available in its input parameters.

Trend-following trading system Exp_XPeriodCandle_X2 is based on the signals of two indicators: XPeriodCandle and XPeriodCandle_HTF.

Indicator XPeriodCandle in the main chart.

Indicator XPeriodCandleRange with the timeframe selection option available in the input parameters

An indicator that draws the XPeriodCandle candlestick sizes in points.

Indicator AbsolutelyNoLagLwma_BBx7_Cloud_Digit with the timeframe selection option available in the input parameters.

Three Bollinger Bands channels based on one moving average AbsolutelyNoLagLwma, drawn as a colored cloud, with the display of the last values as price labels and the possibility to round Bollinger levels up to a required number of digits.

Indicator PCaudateXPeriodCandleRange with the timeframe selection option available in its input parameters.

Indicator CaudateCandle with the timeframe selection option available in the input parameters

Indicator XPeriodCandle with the timeframe selection option available in its input parameters.

A trading system based on the signals of indicator XPeriodCandle.

A trading system based on the signals of indicator CaudateXPeriodCandle, enabling to maintain your positions within a fixed period of time.

Indicator to show the difference of the Vortex indicator lines.

Trend-following indicator Vortex.

TCI

Indicator TCI (Trading Channel Index).

TII

Indicator Trend Intensity Index.

TAI

Indicator Trend Analysis Index.

Stochastic relative strength index increases the sensitivity of RSI (Relative Strength Index), the disadvantage of which is fluctuation between boundary lines and no signals to open a position.

Indicator "Range Indicator."

A signal indicator of daily ranges.

Oscillator PAIN (Price Action Indicator).

1...495051525354555657585960616263...183