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 and MQL5 Source Code Library

You don't know where to start learning the MQL5 or MQL4 programming language? Various programs for your MetaTrader terminal are available here. Download and study published code examples, develop your own indicators and Expert Advisors. Publish your applications in the largest library of MQL5 and MQL4 codes, and they will be available in every MetaTrader terminal and MetaEditor.

Your code examples in MQL4 and MQL5 will be distributed worldwide, and thousands of traders will know about you!

Submit your code

The Decycler: John Ehlers, "Cycle Analytics For Traders" by John Ehlers, pp. 43 - 44.

This indicator summarizes the volatility of multiple periods.

Triple Stochastic Ea. fully customizable. Draws Arrows ONLY Stops are placed above highs and lows your option to place stop at high or lowest price of the last x number of candles. The two larger stochastics must be in same direction then waits for a cross in the same direction on the smaller stochastic. option to place target at any % of SL - 100 would be a 1:1 rr. 200 1:2 ect. here is a trading ea https://www.mql5.com/en/market/product/66540?source=Site+Market+MT5+Search+Rating004%3athree+stochastic

fibonacci levels of high low , fibo yearly has high low of last 3;6;12;24;ect months .enjoy

Ehler´s Quotient Transform

Updated T3 floating levels

Extended version of the original Heikin Ashi indicator.

Calculates the average range of prices (in points) for intraday periods.

This is a helper indicator which allows you to adjust vertical scale of a subwindow manually, which is useful for zooming in and zooming out graphs of your favourite indicator placed in the same subwindow.

The Decycler II: John Ehlers, "Stocks & Commodities V. 33:09", стр.12-15

Ichimoku is one of the excellent indicator which can work lonely or with other indicators. With Alerting indicator which send notification to your cell phone whenever Tenkan-sen Cross Kijun-sen you can have an opportunity to enter or exit market at right time .

JMA is an indicator which is the transformation of the accumulated background data is the essence of this technical indicator. JMA offers an opportunity to recognize several peculiarities and patterns that are invisible to the naked eye in price dynamics. Based on this information, traders may expect more market changes and change their strategy accordingly.

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 Function will retrieve the Assets next Opening Time and Closing Times, either following the current time or following a given time.

Draws Pivot Points formulas

This class loads a licensing file by reading 64bit encrypted account data from a license file into an account array for the purpose of licensing. The Class is initialised with a Filename, a Master Key and whether the file needs to be saved in the common folders or not.

The Decycler: John Ehlers, "Cycle Analytics For Traders" by John Ehlers, pp. 40 - 41.

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

Double breakage of MA8 and MA20 means with stochastic and trix filters, as described by Caco Maia.

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

This is a Script and Class for creating, evaluating and adding accounts to an encrypted license file for licensing an MQL EA or Indicator.

Volume/Volatility Indicator

An easy-to-use multi-currency library, usable in indicators and EA.

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.

The currency strength meter is a trading tool that is used to identify trending and consolidating markets based on the percentage rate of change in price from one period to the next.

The Cyber Cycle: John Ehlers, "Cybernetic Analysis For Stocks And Futures", pg.34

The currency strength meter is a trading tool that is used to identify trending and consolidating markets based on the percentage rate of change in price from one period to the next.

hybrid sorting algorithm that provides both fast average performance and (asymptotically) optimal worst-case performance

gnome sort is based on the technique used by the dutch garden gnome

The breakout strength meter is a trading tool that is used to identify which currencies are the strongest to breakout, and which currencies are the weakest to breakout

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 is a wrap for using databasexxx

I find the lot calculation tedious so I just use this script and tell it the dollar amount to use. It then does the rest. This works for any currency.

I find the lot calculation tedious so I just use this script and tell it the dollar amount to use. It then does the rest. This works for any currency.

a simple sorting algorithm that people use to manually sort cards in a bridge hand

The breakout strength meter is a trading tool that is used to identify which currencies are the strongest to breakout, and which currencies are the weakest to breakout

A light header-only version of Log4mql that provides standardized logging.

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.

an in-place comparison sorting algorithm

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172