Watch how to download trading robots for free
Find us on Telegram!
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 - 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.

Submit your code

Just a Basic Functions For BreakEven.

A second version of GARCH volatility indicator of

Due to recent popularity of Multi currencies EA, This codes allows to Close Orders or delete Pending orders of a Multi Currencies EA, Single Currency EA or Manual orders.

Developed by John Ehlers, the RSI-based inverse Fisher Transform is used to help clearly define trigger points. The normal RSI indicator is calculated and adjusted so that the values are centered around zero. The inverse transform is then applied to these values.

This is an MT4 indicator which generates signals based on Bollinger bands crossover with price.

This is an EA to generate signals based on RSI signal crossing the upper level or lower level.

This code can be used to find highest high and lowest low of a chart for a given period.

This indicator plots multiple signals based on MACD main and signal lines.

This code identifies highest high and lowest low in the neighbourhood.

This indicator compares the main and signals line of the stochastic indicator and marks the sam eon the respective bars on chart.

This code can be used to create rectangles on chart.

This EA demonstrates how to implement martingale based on signals from any indicator.

This is an EA based on Bollinger band crossover with prices.

This is an EA using RVI crossover.

This EA demonstrates placing orders, modify orders and then closing orders after a fixed interval.

This EA places buy trades based on trend of last 5 candles.

This code can be used to read csv files and separate string based on a separator token.

This is a RVI crossover indicator.

This is a WPR crossover indicator based signal generating indicator.

This is a ADX crossover based Indicator.

This code can be used to take screenshot from code itself at any particular desired time.

This is a multi timeframe dashboard scanner for RSI and Stochastic.

This EA is based on upper and lower Bollinger bands.

This is an indicator based on tolerance for highs of two candles.

This is an Indicator based on MA crossover.

This is an EA based on Moving average crossover.

This is a simple code to draw triangle on chart connecting open and close of different candles.

This Indicator will plot bullish and bearish candles in separate colors.

This ADX version is used on many other popular trading platforms. It is different to the standard one included with Metatrader.

The indicator sends a signal at the moment the price crosses a given level, using alerts and push notifications

Simple stoploss script

cycle timeframes using hotkeys 'N','M' prev,next timeframe

Elegant oscillator - metatrader 4 version

Force index with Volume/Volatility bands

Quantile Price Analysis by Jas Wu, Calculations are below.

Slow Line of the original Didi Index

it saves the current chart to default template , it just helps to do it faster than a manual save. you can assign a hotkey for it. it has no confirmation and immediately saves the template, if you want it to save to a template other than default just edit the code and replace "default.tpl" to any other name you want.

Larry Williams 'Greatest Swing Value' as an indicator

This code helps beginners in MQL4, specially those migrating from C++ to perform some basic fie operation.

This code base is a simple function to check if current time lies within two specified times.