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

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

Trend Envelopes indicator that uses ATR for the price change calculation and is adding prices smoothing prior to be used in calculations.

Trend Envelopes indicator that uses Standard Deviation for the price change calculation and is adding prices smoothing prior to be used in calculations.

This version of Trend Envelopes RSI indicator differs in one significant point: instead of using fixed value (5) for envelopes calculation, standard deviation (adjusted by multiplier) of the calculated RSI is used for envelopes calculation.

Trend Envelopes indicator that uses Standard Deviation for the price change calculation.

Trend Envelopes indicator that uses ATR for the price change calculation.

This version of QQE is using Parabolic Weighted Velocity to determine trend.

This version of QQE is using Velocity indicator to determine trend.

QQE (Quantitative Qualitative Estimation) using CCI (Commodity Channel Index) instead of RSI (Relative Strength Index) as a "basic" indicator.

Schaff Trend Cycle CD is usually calculated using Signal line of the MACD, meaning EMA (Exponential Moving Average) of the difference of two EMAs (Exponential Moving Averages).

Ultra Trend indicator that uses a "fast" (fast in response to market changes) Zero Lag TEMA for trend calculations.

Ultra Trend indicator that uses a "fast" (fast in response to market changes) Zero Lag DEMA for trend calculations.

Ultra Trend indicator that uses a "fast" (fast in response to market changes) Zero Lag MA for trend calculations.

Mikko Breakout indicator is based on a break of previous highest high or lowest low.

This indicator is actually a combination of two values: it shows the crosses of fast and slow Zero Lag TEMA, and that cross determines the current market trend.

This version of Schaff Trend Cycle uses a much "faster" moving average than EMA (NonLag MA) for that calculation which makes the resulting MACD "faster" and thus the resulting Schaff Trend Cycle "faster" to to market changes.

Bollinger Bands Stops indicator that uses JMA (Jurik Moving Average) for calculation.

Three moving average cross with MACD signal verification before opening order. Updated 8/30/2018:

Variation of the Linear Weighted Moving Average where the weights can be changed to form a parabolic curve.

This version of Jurik Velocity extends the original by allowing you to change the "power" of the calculated averages used for velocity calculation.

TRIX indicator using a logarithm of a price and JMA (Jurik Moving Average) instead of Exponential Moving Average for smoothing.

TRIX indicator using a logarithm of a price and T3 instead of Exponential Moving Average for smoothing.

TRIX indicator using a logarithm of a price.

Multi timeframe version of the Trend Trigger Factor JMA indicator.

Multi timeframe version of the Trend Trigger Factor indicator.

Trend Trigger Factor indicator ported to MQL5 from wrongly coded version for MetaTrader 4.

Trend Trigger Factor indicator with JMA (Jurik Moving Average) smoothing to lessen false signals and some extras in order to make the trend triggering state easier.

Trend Trigger Factor indicator with T3 smoothing (to lessen false signals) and some extras in order to make the trend triggering state easier.

Keltner Channel calculated as Perry Kaufman's Adaptive Moving Average (KAMA) +- ATR distance for the bands.

Keltner Channel calculated as JMA (Jurik Moving Average) +- ATR distance for the bands.

Keltner Channel calculated as Non Lag MA +- ATR distance for the bands.

Juice is a standard deviation indicator that shows if the deviation is below or above some fixed level. That way it can show if the volatility is increased or not compared to that level.

This version of Elliot Oscillator allows you to chose periods of calculation.

This version is the smoothed version of the original Range Oscillator + Bands indicator. Smoothing is cleaning up some false signals and, since the smoothing method is JMA (which has very small lag) the added lag is as small as it can be making it much easier to use in a lot of decision situations.

This version of Range Oscillator has smoothing option in order to avoid some false signals.

Export history of closed positions from MT5 retail hedging account selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software.

In order to filter out some of the signals of the Price Zone Oscillator - Floating Levels indicator, smoothing is added to this version.

This version of Price Zone Oscillator is an attempt to solve the "too fast" slope issue of the original indicator.

This is sigmoidal normalized version of RSI. Additional JMA smoothing is used in order to produce smooth results.

This version of Normalized RSI is adding JMA smoothing to it in order to make that volatility lesser and to attempt to make the slope of the RSI more usable without adding significant lag.

Normalized RSI tries to fix the "RSI problem": the longer the calculating period, the flatter the RSI becomes.

1...454647484950515253545556575859...183