Watch how to download trading robots for free
Find us on Twitter!
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

MQL5 Source Codes of Expert Advisors for MetaTrader 5 - 4

icon

Expert Advisors analyze price charts and trade automatically following underlying rules. Here you can find MQL5 source codes solving a variety of problems. You are able to select both simple Expert Advisors based on moving average crossing and complex ones involving complicated signal generation algorithms and protection against trading mistakes.

You can download and launch offered Expert Advisors in MetaTrader 5. It is recommended that you test and optimize trading robots in the Strategy Tester before using them. The library of Expert Advisors is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

This code use detect economic calendar and put pending order before released news time

Check exists pending order prevent duplicate create pending order

Use protect profit after open position

& moving average , two rsi filters.

awesome oscillator, stochastic filter. expert

trending breakout

pips in time

Calculates Brokerage, Commission or Slippage based on the Input on the strategy Tester

Buy Sell on your price, Choose Market order, Pending Limit order or Pending Stop Order

macd divergence and rsi filter

Checks if Metatrader5 Terminal is connected to Internet or not. The expert will Print a message for the connectivity status

This EA can Calculate each trade volume base on received TP and SL Prices and Risk percent of account in each trade.

For MT5, When Press the Button, it will delete all STOP LOSS and TAKE PROFIT applied to Current Open Market positions. For All Symbols. The panel is based on the CDialog class, works for all symbols

Converted Ronz AutoSLTP MT4 version into MT5 version. Original Link: https://www.mql5.com/en/code/11649 Original Descriptions: EA for Automatic Stop Loss, Take Profit, Profit Lock, and Trailing Stop (With Special Methods). SL and TP could be hidden.

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.

This is a MT5 expert advisor which displays the total stoploss and takeprofit value for open positions.

This is an utility which allows you to list all open charts, indicators, expert advisers, and scripts in alphabetic order, and switch between them.

It is Diffrent complex Range BreakOut system. Using to Range Breakout system is defined by min number of bars and max width in pips. This robot is can use to volatility instrument.

This EA collects information about the spreads and Shows the number of spreads in the specified range based on the ticks that occur each year.

This EA collects information about the spread and shows the statistics on the chart. When the EA ends its working, it prints all statistics to the Journal, which can be useful for the Strategy Tester.

This is a simple EA test code I made for adapting Candlepatterns.mqh

Ea working well on EURUSD1 H1 with initial parameters, using a simple strategy based on Bollinger bands and RSI.

The 8 effective steps to build a robust day trading plan using Fibonacci retracement

Copy trading has become such a critical feature of forex trading. Some people see this as a potential business opportunity, while for opensource die-hards like me, we believe in giving back to the community rather than putting a price tag on everything 'nice'. So here it comes. A free opensource trade copier, which you are freely allowed to modify and distribute according to MIT license terms. It still has limited features, but the essentials like lot normalization are there. Please note that this copier only works for trading terminals installed on the same machine. Please share back any upgrades, enhancements or bug fixes to the discussion. Enjoy!

A Sample of Averaging Up/Down Martingale EA.

This is a module for MQL5 Wizard and Standard Library, which allows you to generate expert adviser based on arbitrary set of indicators and conditions.

This strategy is the well known set & forget with the ALERTING system. It is very useful on different trading scenarios. I urge you guys to always use trading tools that will make your live easier. So instead of watching the charts and the time and all day long, you can use this indicator that will watch the charts for you.

Slightly improved version of the previous one.

Trading panel that allows user to define levels of trade by simply dragging lines.

This program lists and shows information about calendar events between specified date range.

Synchronous change of a trading instrument in all charts

Trend Follower Range Breakout System with Martingale.

I want to share with you this story. When I started trading, I learnt the scalping strategy in a volatile market. I really loved scalping especially when I see the price is moving fast. However, scalping for a long period of time is exhausting to me especially in a volatile market; volatile market requires fast analysis, actions and reactions; that is why I always reach a point that I loss concentration, focus and I start making those really stupid mistakes. That is why I created this EA, that is based on the indicator Identify potential entries, that helped me to automatically identify these potential entries (based on the formation of candlesticks) instead of doing all the work myself and it will trade these potential entries for me. I know there are plenty of Metatraders who also suffer from this and that is why I would like to share this EA with you, hopefully it will be beneficial. Do not forget to send you comments as well as rate these scripts. Happy trading!

this expert opens trade in the direction of the trend when specific rate of average daily range has been passed.

this is my first try at creating an EA from ground up - update 4

Basket Closer Type EA.

This Multicurrency EA is based on Currency Strength Indicator.

It's a two (2) pairs correlation system to use 3 currencies to make 2 pairs to open hedge orders on those. The expert starts opening four orders for each couple (2 plus and 2 minus) and wait to move prices in one direction to make a grid of orders. For more information, please read the MT4 version of the expert: https://www.mql5.com/en/market/product/34112

It's a triangular arbitrage system (three pairs correlation system) to use 3 currencies to make 3 pairs to open hedge orders on those. The expert starts opening six orders for each ring (3 plus and 3 minus) and wait to move prices in one direction to make a grid of orders. For more information, please read the MT4 version of the expert: https://www.mql5.com/en/market/product/33814

1234567891011...36