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 Codes of Expert Advisors for MetaTrader 4


Various applications to automate analysis and trading are available in the 'Expert Advisors' section. It features various applications based on different trading algorithms and provides different degrees of automation. You can find simple EAs and complex trading robots that can fully automate analysis and trading processes.

These applications can be downloaded and run in MetaTrader 4. It is recommended to test and optimize Expert Advisors in the Strategy tester. The Expert Advisors from the library can be accessed from the MetaTrader 4 platform and the MetaEditor development environment.

Submit your code

This code will pause the trading for X minutes when there are N consecutive losses happen within Y minutes

trade 35 minute after london session and stop close all 3 hour after london session i dont know about coding , i made this ea on

This EA can do Grid trading and has useful functions for Gridtrading included

This is an Expert Advisor code for counting open running orders for each type: OP_BUY or OP_SELL.

Forex Trade Manager MT4 simplifies managing open orders in MetaTrader 4.

Forex Trade Manager Grid MT4 helps you to managing orders and achieve the goal.

Search for positive swaps.

Mean Reversion strategy works best on daily time frame major forex pairs .

This EA will Close All your current running Trades when Applied.

Our newest Ai trading software! Enjoy investing in the safest way. Uplink Trade Hedge is using a safe hedging strategy which allows you to invest safely into the forex market. No quick profits but an investment opportunity. Invest for your future!

One code that works for both Mt4 and Mt5 combined. Salient features of the code: -Filter News by High, Low or Medium Volatility -Filter By currencies -Filter by News Keyword -Auto GMT offset check -Dashboard to show upcoming News (Can be enabled or disabled) -Lines on chart for all Upcoming events -Code can be easily modified to place trade at certain time before or after an event or to just stop trading during events.

Checking the Cross of First Two lines of the Ichimoku Indicator

An Efficient EA to notify breakouts

Only successfully tested on INSTAFOREX broker, server 5 digits, pair EURGBP daily, leverage 1:1000, with free swap account.

Adaptive grid expert for mt4

Detecting the start of a new bar or candle, in the OnTick() event handler of an expert advisor.

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.

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

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

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 EA is based on upper and lower Bollinger bands.

This is an EA based on Moving average crossover.

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

This code can be used to find out whether the symbol is a binary option symbol or not.

This code base is a simple function to check if current time lies within two specified times. Many times it is required by the Ea to enter trades between two specific time of the day only. This code takes two inputs, one is the start time and second is the end time. The code will check if the current time is in between start time and end time and will return accordingly.

The code is used to demonstrate how one can create a button on the chart and assign a function to it. The code is used to delete all orders after clicking on the button. The deletion takes care of various scenarios and shows error messages.

This code will give custom sound on alert on new bar.

This code places only one order every second ( not every tick )

This code help you get the time of an object created on a chart.

This EA will tell you the Depth Per Inch of your screen.

This code is used to create static object on MT4 charts which will not move along with the chart when you scroll the chart.

it gives you the name of the indicator which is attached to a chart.

This code simply prints the account details for a MT4 account.

It's an expert to open and close orders on specific day and time. Expert open and close orders only with the same symbol it attached.

Read news from forex factory website by web request

Use trailing stop point with MT4