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

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.

This EA was created for learning purposes and can be developed for trading purposes.

Short description.

With the aim of educating you how to make trading tools that are simple and can be used immediately.

It's a auto scheduler.

This EA is used as a trading tool to help us close all orders with a specific target in the form of money or cut loss. We can filter orders by magic number.

Add on tool to support our trading by shifting stoploss (SL) to the profit area

For the purpose of learning to create an EA, I will share how to make an EA that uses 2 cross moving average indicators as a trading position entry signal.

The simple trading panel is a trading tool that is very interesting because it will allow you to predefine your StopLoss and your TakeProfit in term of pips.

Deep learning Expert advisor , This EA will collect market patterns to predict the next Patterns.

Fibonacci PRO ⭐️⭐️⭐️⭐️⭐️ You want to become a constantly profitable 5-star forex trader? ⭐️⭐️⭐️⭐️⭐️ FIBONACCI PRO is a professional expert for trading according to the Fibonacci Retracement method. 1. MANUAL_CONFIRMATION - manual confirmation of transactions; 2. FIBO_CLOSE_PRICE - FIBO calculation at closing prices; 3. RSI_FILTER - input filter by modified RSI; 4. ATR_FILTER - ATR input filter. 5. ZIG ZAG

This is a great template to start from if you're looking to build an MT4 EA quick and easily with your own rules/custom indicators. It has all the nice features for managing the account and the trades.

Force=((Bid-close)/close)*10000;

123456789101112131415161718192021222324252627