Download MetaTrader 5

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

MQL4 and MQL5 Source Code Library

You don't know where to start learning the MQL5 or MQL4 programming language? Various programs for your MetaTrader terminal are available here. Download and study published code examples, develop your own indicators and Expert Advisors. Publish your applications in the largest library of MQL5 and MQL4 codes, and they will be available in every MetaTrader terminal and MetaEditor.

Your code examples in MQL4 and MQL5 will be distributed worldwide, and thousands of traders will know about you!

A library to provide simple storage mechanism for expert advisors and indicators.

WPR (Williams Percent Range) based support/resistance.

A set of digital filters that are always drawn in separate window (due to their nature).

A set of 4 types of digital filters that naturally are placed on main chart.

Based on Mel Widner's Rainbow Average (that is similar to Guppy MMA), this is a sort of generalized version with quite a few extensions.

Handy functions for comparison and rounding of floating-point numbers (prices, lots and money).

Well known NonLag MA with additions and adjustments.

MACD High/Low made multi timeframe.

Ultra Trend indicator made as multi timeframe.

Indicator based on the NonLag Moving Average.

Ehlers Distance Coefficient Filter coded exactly a Ehlers described it in his book "Rocket science for traders".

This is the "zone" indicator using Ehlers Nonlinear Filter for calculation.

Ehlers Nonlinear Filter provides extraordinary smoothing in sideways markets and aggressively follow major price movements with minimal lag.

This version of Zone Trade indicator is made to show as histogram in separate window.

The indicator was described by B. Williams as fourth dimension - Trading Zone.

This version of Heiken Ashi Zone Trade indicator is made to display values in a separate window - that way it will not interfere with the other on-chart indicators and can be easier to read the states in some cases.

Heiken Ashi Zone Trade indicator is based on 3 indicators: Heiken Ashi, Accelerator Oscillator, and Awesome Oscillator.

Trend Intensity Index as described by M.H.Pee in his article "Trend Intensity Index".

This version extends the basic version of Leader of the MACD with some options that are adding more flexibility to the usage of the indicator.

Trend Strength Average uses some of the 4 regular types of averages for trend strength assessment.

Trend strength assessment based on Jurik smoothed RSI.

Trend strength assessment based on RSX.

ADXVMA Histogram is a binary version of ADXVMA indicator: instead of showing the values of ADXVMA on chart, it displays only the state of the slope of the ADXVMA in a form of a histogram.

ADXVMA uses modified ADX calculation for adapting Moving Average calculation.

Trend Continuation Factor (TCF) indicator identifies the trend and its direction.

Trend Continuation Factor (TCF) indicator with Jurik smoothing identifies the trend and its direction.

The Phase Change Index (PCI) is an indicator designed specifically to detect changes in market phases.

Variation of the well known Bollinger Bands indicator.

T3 Deviation uses intermediate steps of T3 calculation to get the deviation based on T3. As expected the deviation calculated this way is much smoother than the Standard Deviation (as a result of using T3 which on its own is smoother than the simple moving average), and is "faster" in response to market changes.

Zero lag T3 uses the "zero lagging" method to make it even faster and to keep the smoothness.

This version of Hull Moving Average makes the lag even lesser and still keeps the smoothing of the Hull Average thus making it even "faster".

Ron Black's Swing Line indicator with only two states displayed: state up and state down.

Based on the original Dynamic Balance Point, this version is a bit cleaner and simpler to use indicator.

TWR is an indicator of a trend reversal.

The QQE (Quantitative Qualitative Estimator) indicator consists of a smoothed Relative Strength Index (RSI) indicator and two volatility-based trailing levels (fast and slow).

Ron Black's Swing Line indicator made as histogram indicator.

Ron Black's swing line indicator with adjusted display option.

ADXm is a variation of a well known ADX indicator made to be multi timeframe capable.

ADXm is a variation of a well known ADX indicator.

Indicator that calculates dynamic balance point for the desired period.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116