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

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

[@Buy_Sell_Close] Manual trading EA for trading newbies, EA can be used in backtesting visual mode, EA can also be used in live trading. You can practice your own trading system in backtesting.

this shortcode will calculate the drawdown of a particular ea, where it is applied to a specified symbol.

When we want to know how many times price will goes up and down 40 pips before breaking this channel, we will need Bounce Number tool.

This strategy eliminates the need to rely on indicators, candlestick patterns, chart patterns, or any price action. This EA employs a progressive system that I have been using for the past six months and have backtested for over three years.

a Simple Visual Strategy Tester / Manual Trade Training using Martingale.

Most EAs tend to close orders in take profit based on the distance in pips from the purchase price. However, this MQL4 code is based mainly on the current profit.

A Donchian Channel Strategy breakout EA Scalper. Best results at H1.

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

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, 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.

12345678910111213141516171819202122232425262728