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 Source Code Library for MetaTrader 4

The largest library features codes of free trading Expert Advisors, technical indicators and scripts. With the available applications you can trade in automated mode and analyze price dynamics. Use the library of codes to learn more about financial market sentiments.

Download free applications, test them and run in your MetaTrader 4. You can access them from the MetaTrader 4 platform and the MetaEditor development environment.

latest|best

Schaff trend cycle - adjustable smoothing.

Quantile bands.

Dsl (discontinued signal line) - stochastic.

Dsl (discontinued signal lines) - RSX

Dsl (discontinued signal lines) - MACD.

Dsl (discontinued signal lines) - RSI (MetaTrader 4).

NonLag smoothed inverse fisher transform of RSX.

Small Expert which sends email notification of last opened and closed order.

This script allows you to close orders with one click, filtering by profit, loss, magic number and comment.

OpenOrder script allows you to open an order defining the % of balance to risk, the Stop Loss distance in pips and the Take Profit distance in pips and a magic number.

Open positions in MT4 with absolute control of the risk / reward ratio, automatically calculating the lot size.

Expert Advisor which trades breakouts in several pairs during the London Session.

By using this indicator you can see the normalized price of any chart!

Displays current bid price and % change of (open price of) current bar or X previous bars, also High, Low, and range.

Automatically draws Fibonacci retracements on chart.

Example of a simple breakout trading robot. There are a lot of breakout methods, but this is the simplest one as I think. Please see the attached images to visualize what is the breakout trading...

Expert Advisor to trade Yen Crosses based on Major Pairs and USDJPY divergence/convergence.

Code example of MACD automated with advanced money management function.

Pivot indicator. Standard, Fibonacci, Camarilla, Woody's, Demark. Calculates pivot points from previous bar of chosen period (M5 - MN).

This code was written as an indicator. It adds top and bottom margin to the chart. Both can be adjusted separately.

This library has smart notification(alert, push and alert) function with an option of having a single notification per candle at a time.

This is a simple indicator that plots Signal History on the chart.

Moving Average based on Ultimate Oscillator. It calculates weighted average of three moving averages (Simple, Exponential, Smoothed or Linear Weighted).

The same EA's as previously released. The additional code allows the user to set parameters on RSI and Momentum.

Build Binary Options strategies to test in the Strategy Tester of MetaTrader 4 with Binary Options Strategy Tester utility from marketplace.

Code based on MetaTrader 4 Moving Average indicator.

An EA fully based on the Ichimoku Kinko Hyo system.

MetaCOT 2 CFTC ToolBox Indicators is a set of MetaCOT 2 indicators which provides access to data from CFTC reports. MetaCOT 2 supports COT reports, Disaggregated COT, TFF and CIT. All indicators are available in source code and can be used to build your trading system.

Holt's double exponential smoothing - the trend component (mt4 version).

Holt's double exponential smoothing with linear forecasting.

This indicator shows how much time remaining to the next bar opening.

Phase accumulation adaptive MACD - completely adaptive MACD

Basket offline chart creator script using geometric mean method.

Template EA that downloads news without the use of DLL.

Byte-wise operation with structures and standard data types.

Script for drawing a price markup.

The indicator displays the moving average for the selected timeframe.

Advanced Bollinger Bands indicator.

Elegant and nimble comparison of 'double' values of the "price".

The indicator displays the total lot and profit for the current instrument.

12345678...82