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

The Double Bollinger Band Strategy makes use of two Bollinger Bands in order to filter entries and exits in the forex market.

This is an mql5 Expert Advisor trading the breakouts and using Martin Gale risk management.

Low risk, max profit, winning strategy EA. Based upon Super Scalper EMAs indicator

Trade executed on Tick Macd memory. 3 type of execute trade Ninja, Scalper, and Swing. Highest Sell and Lowest Buy will not close.

This time, we're providing a sample that enters based on the Golden Cross and Dead Cross of the moving averages. If you want to see a sample where a long entry is made when the closing price of the candlestick crosses above the moving average, please refer to this article.

a Versatile automated trading tool for the MetaTrader 4 platform. This EA is designed to assist traders in managing their positions effectively by offering features such as setting a breakeven point, trailing stop, stop loss, and take profit levels. It works with various input parameters, allowing you to customize its behavior to fit your trading strategy.

The EA created sell/buy limit orders according to: - Grid number of orders - Trading range (computed automatically by uwing weekly highs and lows) - Current price

This is a grid trading algorithm idea.

KA-Gold Bot is an advanced trading advisor specifically designed for gold, utilizing the powerful combination of the Keltner channel strategy and two exponential moving averages (EMAs) - the 10-period EMA and the 200-period EMA. Principle of Operation: The 10-period EMA represents the average price cutting above/below the Keltner band, confirming an uptrend/downtrend. The price being above the 200-period EMA supports the uptrend/downtrend. This indicates that the uptrend/downtrend has been stronger than the previous 10 periods, considering the volatility over the last 50 periods.

This is a simple boolean function for the EA to detect if there is any previous open market orders without using the "OrdersTotal()" built-in function which might cause the EA to calculate positions not opened by each specific magicnumber provided by the EA.

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.

fishing EA Opening Trade Buy/Sell Each 4 minute

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.

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.