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

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
latest | best

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.

Single CCI and RSIOMA

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

Turn your losing trade into winning trade with Zone Recovery Hedge

Candle cross either of three lines.

Have you ever wanted to add another trade only after the previous has been modified by either trailing stop or even break even , This code will help you to be able to implement that

trending breakout

candle pattern

macd divergence and rsi

Checks a trading robot must pass

candle cross 3 moving averages

Tipu MACD EA is a simple EA created to automate buy/sell orders based on the MACD indicator. You can automate entries and manage trades. This EA comes with many useful functions that can used to by anyone to create their own EA.

I started to create a simple trading panel to switch between pairs and timeframes. and next version, I will add trading features and manage orders.

This EA, Ask you to Put price, whatever price you put, in "ZEN" field, you will get that price on all open orders either SL or TP value, that would help to close all orders at one price, and you can close all bulk orders in one shot. (works very well with large balance - i suggest cent / micro account for newbees. to be able to place large closure of orders. Openin random orders manually with ongoing trend is suitable for large order accounts.

What if we could have two Stop Loss instead of one?

When you scalp manually, a simple EA could be an assistant to set StopLoss / TakeProfit for each trade you open.

12345678910111213141516171819202122232425262728