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

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

Compared to the Price Zone Oscillator indicator, this version is using floating levels to find out the significant levels.

The formula for Price Zone Oscillator (PZO) depends on only one condition: if today's closing price is higher than yesterday's closing price, then the closing price will have a positive value (bullish); otherwise it will have a negative value (bearish).

The Henderson Filters are derived by minimizing the sum of squares of the third difference of the moving average series. Henderson's criteria ensures that when these filters are applied to third degree polynomials, the resulting smoothed output will fit exactly on these parabolas. The Henderson Filters are suitable for smoothing economic time series as they allow the cycles typical of the trend to pass through unchanged. They also have the property that they will eliminate almost all the irregular variations that are of very short frequencies of six months or less.

Multi T3 Slopes indicator checks slopes of 5 (different period) T3 Moving Averages and adds them up to show overall trend.

Multi JMA Slopes indicator checks slopes of 5 (different period) Jurik Moving Averages (JMA) and adds them up to show overall trend.

Multi Averages Slopes indicator that checks slopes of 5 (different period) averages and adds them up to show overall trend. Averages that can be used in this indicator are the: SMA, EMA, SMMA, LWMA.

Multi LSMA Slopes indicator checks slopes of 5 (different period) Least Squares Moving Averages (LSMA or linear regression value) and adds them up to show overall trend.

Smoothed version of Synthetic VIX.

Compared to the Choppiness Index indicator, this version is using JMA for smoothing (to make it easier to spot the slope direction change of the choppiness index) and to make the values less volatile.

Choppiness Index: another way of calculating fractal dimension.

In order to avoid the too many signals that the regular Random Walk Index tends to produce, this version is using JMA for smoothing which significantly lessens the number of false signals.

The Random Walk Index attempts to determine when the market is in a strong uptrend or downtrend by measuring price ranges over N and how it differs from what would be expected by a random walk (randomly going up or down). The greater the range suggests a stronger trend. The RWI states that the shortest distance between two points is a straight line and the further prices stray from a straight line, implies the market is choppy and random in nature.

Compared to the original QQE indicator, this version instead of using trailing levels uses fixed levels to estimate overbought and oversold conditions. This version is also using RSX (a smoother RSI without a lag) in order to further purify the signals.

Compared to the original QQE indicator this version is adding fixed levels (to help further estimate the trend) and color changing histogram (based on those levels), and also using RSX (a smoother RSI without a lag) in order to further purify the signals.

This version of QQE is also using RSX (a smoother RSI without a lag) in order to further purify the signals.

Compared to the original QQE indicator, this version is adding fixed levels (to help further estimate the trend) and color changing histogram (based on those levels).

Compared to the original QQE indicator, this version instead of using trailing levels uses fixed levels to estimate overbought and oversold conditions.

Compared to the Volume Zone Oscillator indicator, this version is additionally using floating levels to determine the trend.

Volume Zone Oscillator indicator is based on the "In The Volume Zone" article by Walid Khalil and David Steckler, and can be classified as both trending and oscillating (non-trending) in its design.

This indicator is a variation of a well known WPR (Williams Percent Range) indicator with 4 WPR values combined into "candles".

Unlike the Heiken Ashi Smoothed, this indicator is displaying 2 values only: +1 for trend up and -1 for trend down, thus making it suitable for usage from experts.

Instead of using "raw" prices" for calculations, Heiken Ashi Smoothed indicator is using smoothed/filtered/averaged prices instead.

ADXVMA indicator made as "binary" having only two values (+1 for "trend" up and -1 for "trend" down).

In this version of Accumulative Swing Index Smoothed indicator we are introducing a sort of levels that can be used for trend assessment.

This version of the Accumulative Swing Index indicator is attempting to add some more functionality to it by producing much smoother results.

Indicator that is checking for intra-day channel values and breakouts of those channels.

Traditional MACD made stronger with 3 additional rules/filters.

A channel formed by two Double Exponential Moving Averages based on averaged High and Low timeseries

Two independent trading systems using indicators BrainTrend2 and AbsolutelyNoLagLWMA within one EA, with an option of changing the size of the future trade depending on the results of the previous ones for this trading system

Virtual Trailing Stop.

Two independent trading systems using indicators SilverTrend_V2 and ColorJFatl_Digit within one EA, with an option of changing the size of the future trade depending on the results of the previous ones for this trading system.

Two independent trading systems using indicators BykovTrend_V2 and ColorX2MA within one EA, with an option of changing the size of the future trade depending on the results of the previous ones.

Working with two indicators, Fractals and Stochastic, simultaneously, or with only one of them.

An indicator that colors candlesticks going beyond channel Ozymandias.

An Expert Adviswor based on two indicators: iCCI (Commodity Channel Index, CCI) and iAO (Awesome Oscillator, AO)

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs or the total losses on those positions exceeded the Stop Loss level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

An Expert Advisor for closing all positions, in case of the total profits on those positions exceeded the Take Profit level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

An Expert Advisor for closing all positions, in case of the total losses on those positions exceeded the Stop Loss level fixed in inputs, or where it is necessary to close all positions beyond the time interval fixed in the settings.

Indicator Choppiness Index Histogram

Indicator Choppiness Index

1...464748495051525354555657585960...183