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

Indicator Butterworth MA.

Indicator Acceleration Bands

An RSI smoothed by Wilder's moving average

Intraday relative volumes indicator Voltest (VLM)

The EA uses Martingale. Initial entry by indicator iStochastic (Stochastic Oscillator).

Indicator Swing Shift

Parabolic Stop And Reverse as an oscillator

An indicator of bull/bear power.

Indicator Intraday Intensity Index 2

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

A market state indicator

Difference of two moving averages within the range of one-direction candlesticks

Two moving averages on the range of one-direction candlesticks

An indicator of bull/bear power

A configurable RSI

Indicator Average Average True Range

A channel formed by two moving averages AbsolutelyNoLagLwma based on averaged High and Low timeseries

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

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

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

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

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

Indicator Ang_Zad_C allowing changing the timeframe of the indicator in its input parameters, the space between the oscillator and its signal line being filled in color, according to the trend direction

The Expert Advisor uses indicator iBands (Bollinger Bands, BB), two iMAs (Moving Average, MA) from different timeframes, and custom indicator ZigZag.

An Expert Advisor based on indicator iADX (Average Directional Movement Index, ADX).

An Expert Advisor based on cluster indicator CCFp (Complex Common Frames percent)

JB Volatility - market volatility oscillator marking its state in color.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130