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

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

A new and improved version of LineOrder

An Expert Advisor designed to open and close respective orders at the first parabolic SAR signal.

Trades using MA crosses on all timeframes.

This Ea open buy/sell positions based on Grid, no size lot optimised works well on M5

A simple signal indicator that detects MACD Main line extreme value. It filters first pike and displays all after the first.

This simple EA sends hourly status e-mail and informed of the last closed order with some additional information.

Perfect solution for newcomers at coding. Allows to implement strategies with difficult stop-management. Yes, this thing need some "baking", i.e. editing, but you will like the result; especially if the strategy is already tested with hands.

Exponential average true range reduces the lag by applying more weight to recent prices.

A very clean system by Farshad Saremifar, Based On Pivots and ATR and Moving average.

A simple way of managing orders and other features through horizontal lines.

Make big deal!

Live trade monitor that scores up to 10 EA's at once, tallying Pips, Wins, Trades, PF and profits.

Indicator displays News with a market clock.

Often times I find my chart is too cluttered with indicators to see the price action, however I still need those reference points. My solution was to create an indicator which displays the current level of some of the MA's of the current candle.

Three grades take profit Grid System, use it on weak market and fluctuating market, may need close all positions at some time.

This script is useful when you drop lines on chart and want to see the distance to current market price. You can drag line and see the distance in pips.

Basic combination of fractals, DiNapoli objectives and Fibo nodes.

Simple EA based on Alligator indicator.

GRUCHA Percentage Index

YangTrader is a good indicator, it core is price moving and return, when the value crosses 15, maybe it's the best buy time and down cross 80 it's the sell time.

Using 4 Stochastic + post-zigzag indicator(last post). The result is good!!! Profit trades (% of total --82.26%)

The post-zigzag can count the moving of zigzag line. If see many continuous post on screen, It's will more signal for changing the trend of price.

The channel indicator formed of 2 Kijun-Sen lines (Ichimoku system).


Scalping Bollinger Bands Breakout Reversals with RSI confirmation.

Just a simple script , that reads the HTML file a report , or detailed report , and draws a transaction from it on the chart

This script reads your unread GMail messages.

This uses the standard Bollinger Band calculations to further calculate the width of the Upper and Lower Bands, comparing that number to the Max and Min width of the bands for the last N periods. The results are plotted onto a histogram.

Expert advisor that trade in the trend of EMA and buy/sell signals get from Williams %R

Example of using optimization reports in an Expert Advisor.


Combines a strategy based on MA crossover with RSI and MACD confirmation by cmillion

This is the standard Heiken Ashi, but with the option to spot Dojis and color them differently.

Price Alert MetaTrader indicator plays sound alerts when the price reaches certain levels that are specified by the trader.

This is a tool for you to automatically close all orders when you have dozens of pending orders and open orders.

Simple chart to display the highest and lowest values for a data series over "n" bars period.

Grid is a money maker in weak market, while a disaster in trending market. Maybe you can consider close all positions at some time, and run it totally again at another time, just like a fisher. This is AIGrid System With Manual Control.

EA based on the indicator Fibo-Average-2B.mq4

These indicators are made to show how much profit your EA have made in a certain period.

Calculates the Moving average indicator based on Fibonacci value.

A 15min intrday trading strategy

The script prints the week day and time.