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

MQL5 Source Code Library for MetaTrader 5 - 6

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

RSI Bot, send alert buy when RSI<=20, send alert sell when RSI>=80

Based on the original “Time Segmented Volume (TSV)” developed by Worden Brothers, Inc.

Parmis les 5% des traders les plus performant du desk ''Options Dérivées'' de la Société Générale. PnL 22MEUR entre 01/01/2022 au 27/12/2022

The equation of the straight line from the school, it is y = bx + с. (Conversion from https://www.mql5.com/en/code/7883)

Volumes Spread mod

Smooth Algorithms - Corrected/Modified

Sort the input array in-place using comparison function less.

Volume Average percent spread mod

- This Bot use stratery Breakout of Daily Bar, I tested for 3 Pair currency : GBPUSD, EURUSD, XAUUSD - Default setting is not sure the best, you can test for your parameter. - This is version for MT5 that convert from MT4 - this EA is best for broker low spread

It is known that the market is mainly driven by two emotions: fear and greed. This should be seen as an attempt to implement these emotions in the form of a mathematical model.

for export/import of orders and trades between EAs and terminals

The Roofing Filter Indicator was created by John Ehlers ("Cycle Analytics for Traders" pg. 80 - 82).

This indicator shows trend line and channels using the BSI Indicator. Original work of https://www.mql5.com/en/code/13615

A simple and easy to understand function that calculates todays profit, written to the Expert Journal.

Example of daily loss calculation tool You can update it as you want.

Confirmation (trend) indicator used for lower timeframes

Money-managing stop loss baseline indicator for MT5.

This tool outlines extremes made by the prices within the selected window size. This is achieved by estimating the underlying trend in the price using kernel smoothing, calculating the mean absolute deviations from it, and adding/subtracting it from the estimated underlying trend. Originally Made By LuxAlgo. Coded in MT5 format.

The indicator is an equivalent \"Chart Window\" version of MACD.

Automatically export csv file

The Restoring Pull Indicator was created by John Ehlers (Stocks & Commodities V.11:10 (395-400))

One code that works for both Mt4 and Mt5 combined. Salient features of the code: -Filter News by High, Low or Medium Volatility -Filter By currencies -Filter by News Keyword -Auto GMT offset check -Dashboard to show upcoming News (Can be enabled or disabled) -Lines on chart for all Upcoming events -Code can be easily modified to place trade at certain time before or after an event or to just stop trading during events.

Get notifications when hit price level

This EA started off as a job to trail equity. I then added the function of managing individual trades. Thereafter I added the facility of manually putting the price of when it can send a grid of pending order's. This EA does not have condition set in it to open trades. You have to determine that if market moves to an area you believe you would open a grid of orders if you were by your computer watching the market. No what this EA helps is you wake up in the morning you see the area you a grid to open. PUT THE PRICE FOR THE EA TO OPEN A GRID OF PENDING ORDERS. If the market reaches the area price you have set. The EA will send the grid and will manage those trades putting Stop Loss (if you set it) trailing(if you set it). Today 13 Sep 2022 the EA generates has NO ERROR when compiled

Show trade history

he script estimates the bar's High-Low-Close, based on the stream similarity.

An indicator for drawing all important Pivot Points including: "Classic", "Camarilla", "Woodie", "Floor", "Fibonacci", "Fibonacci_Retracement".

Source code of simple order panel

The Predictive Moving Average was created by John Ehlers (“Rocket Science For Traders”, pg.212″).

This library shows useful informations and do a lot of functions to a symbol.

Modify to allow direct specification of the starting point of the Parabolic SAR.

Allows you to determine the occurrence of a new bar event in a multicurrency Expert Advisor

Two pending orders at the beginning of the day

The Expert Advisor is a joke: the position is opened randomly. Now there is a Stop Loss, Take Profit and much more

Expert is a joke! The position is opened at random!

A series of indicators 'Four Colors'. Signals are now 'Arrow' in the main window

An exponential moving average of the true range and the offset of its average deviation

Added alerts to custom indicator

Candlestick chart without shadows

A simple trading system using the custom indicator "WPR Custom Cloud"

12345678910111213...183