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 Code Library for MetaTrader 5 - 12

icon

This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.

You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

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

Catching the extreme change on candle.

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

Non-anchored discontinued signal line RSI of average

Discontinued signal line version RSI of averages

Discontinued signal line CCI using average of price for filtering signals

Discontinued signal line MACD

This is a re-write of the old Solar Winds indicator for MQ5. There has recently been some 'excitement' about using this with other indicators for entry signals, and after a request to develop an indicator using it, I found that it was a classic re-painter - so I am contributing this code with an easy switch to allow seeing the indicator in re-paint versus non-repaint mode.

This simple indicator is just a statistical label showing Last and Current Candle Amplitude (MinMax), Last and Current Day Amplitude, Current Tick Amplitude and Time Remaining for next Candle. It also shows Server Time (Market Watch) and Local PC Time so you can focus more on the graph and adapt to market hours.

Building good trading habits by seeing things in terms of percentage not in terms of money.

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

This indicator summarizes the volatility of multiple periods.

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 (m_hkey -> can be a secret key of your choice) 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.

1...5678910111213141516171819...183