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


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

Trend following system with breakout of different EMA as entry signal and SL and a breakout of highest high and lowest low as TP.

This indicator draws a horizontal line at the Average/Breakeven Price for multiple positions.

RSI average commodity for gold and silver.

The Expert Advisor shows information about the current spread.

The Expert Advisor makes random buy/sell with automatic Trailing Stop.

The indicator draws horizontal lines corresponding to daily, weekly, monthly highs/lows and connects them consistently trendlines.

The indicator marks the current chart with red/blue arrows to signal a possibility for buy/sell.

The SmartAssTrade-V2 Forex Expert Advisor is a new update for SmartAssTrade EA Version 1.

The script gets all the symbols available on your platform and writes their closing prices for a specific bar to a csv file.

This indicator gathers indicator data and prints them in the csv file.

AutoTStop EA does not work to open the orders, but only helps trader to use Trailing Stop.

Expert Advisor that moves Stop Loss according to Fibonacci retracements or expansions.

The idea is to work with a trigger, based on ADX, CCI, RVI, WPR and EMA.

Easy to use ticks recorder.

Helps trader by setting automatic Stop Loss (SL) and Take Profit (TP) on trades while scalping.

Classic Donchian-channel with Fibonacci retracement levels.

Draws either MACD, Stochastic, RSI or CCI of 3 timeframes in a separate window.

This indicator will show trend, based on EMA200 of the higher timeframe.

This is simple copy of STUFIC PRO strategy which you can follow as signal or buy at the market.

This script automatically closes all open orders within few seconds.

Pivot points - Midpoints, H4, Daily, Weekly, Monthly.

The indicator is a combination of MA channels and Bollinger Bands.

The indicator displays Market Sessions.

This strategy uses hedging if trend changes.

The indicator computes the volume-adjusted flow of a currency considering all currency pairs available on your platform.

A tool to better visualize price action using a higher timeframe.

The header file contains functions for searching last and previous order in the trade pool.

The simple class for counting of the orders with different filters: by symbol of currency, Magic Number, either closed, either opened orders.

Expert Advisor work with one hour chart, and is the best robot for now, plays a sound when orders/alarms are executed and multiply positions by 10 when 5 digits is true, trailing stops every tick regardless of Execution Mode.

Fractal volatility indicator based on Bollerslev Model.

Change of the spread is being reflected in the candlestick formation, which you can use to more accurately place your stops and not get kicked out of a trade when it might just be challenging a price before making a huge swing in the direction you initially placed your trade.

Trade using Renko Boxes in MetaTrader 4.

xLiquidex_V2_Mod1 is an Impulsive/Volatility/Breakout Expert Advisor.

Draws horizontal grid lines at specified distances.

The indicator shows trade signals using combined Stohastic with breaking of High/Low by Moving Average.

Forex indicator ChainPriceRSI is based on the RSI and MA indicators.

This template code contains basic features and functions required for the developing the Expert Advisor.

The indicator shows top and bottom ranges of price movement.

Auto pending and manage orders by RSI, lower risk at weekend, send mails if necessary.

Modified Nick Bilak's b-clock with spread (ask-bid) and font customization (font, color, size).