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

icon

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

Buys when price breaks above the MA and Sells when price breaks below the MA. User can choose the time range (server time) to trade in.

This class allows you to create buttons on the chart as if they were chart objects(have time and price coordinates) these objects can be dragged on the chart and when scrolling they stay at the same place. If you wan't to learn some Object Oriented Programming or if you wan't to understand how chartevents work or you wan't to create graphical interfaces, you can learn a lot from this.

Th Expert will set the TP based on the SL manually set using the input multiplier. Using this you can set 2,3,4 etc times the SL set.

The Expert will help you change the TP/SL of all open orders by setting the TP/SL based on the input percentage value.

Move the stoploss as the trade moves in your direction at a specific distance.

This is a simple EA that will buy/sell pullbacks while managing your given risk parameters. You need to decide on a direction, and the EA will do the rest.

Crypto EA for ETH/USD pair.

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

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.

AK-47 Scalper EA is fully automated. It uses the strategy of entering the sell Stop order continuously and will modifythe order when the price is opposite to the pending order.

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.

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, InstaForex-Europe.com 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.

123456789...29