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

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 will display the Account Trading Report for real trade.

Margin Calculator, Point Value Calculator, Position Size Calculator, Profit Calculator and Swap Calculator.

The MelBar™ EuroSwiss 1.85x 2Y™ Expert Advisor is a specific purpose profit-scalping tool which success depends on your understanding of its underlying strategy and your ability to configure it. Backtest results using historical data from 6 February 2018 15:00 to 19 February 2020 00:00 for the EUR/CHF (M30) currency pair proves very highly profitable. Initial Deposit : US$500 Investment returns : US$1426.20 Net Profit : US$926.20 ROI : 185.24% Annualized ROI : 67.16% Investment Length : 2 years 14 days (2.04 years) Visit these websites : https://352422.e-junkie.com/product/1645482 https://www.facebook.com/TheSoftwareSuite/

NZD/USD (M30). Historical Data 18 September 2014 to 18 February 2020. Initial Deposit of US$500 acquires a Profit of US$1625.40 or Profit Return of 225% after 5½ Years. Result : Investment Gain $1,125.40 ROI 225.08% Annualized ROI 24.30% Investment Length 5.42 years MQ5 Software Program Attached. Visit these websites : https://352422.e-junkie.com/product/1645482 https://www.facebook.com/TheSoftwareSuite/

This is MQL5 project packer: assemble all source and resource files from dependencies into a single ZIP.

The Rapid Doji EA is a fully functional MetaTrader 5 Expert Advisor that uses pending orders (one BUY and one STOP) around each Doji candlestick on the Daily (PERIOD_D1) time frame. This is a great introduction to how to build a simple, profitable EA. You can watch, step-by-step, how this EA was built via YouTube videos. See the link in the code for details.

Converts trendlines into horizontal lines.

Trading the STRONG against the weak!

Have a look here: https://www.mql5.com/en/market/product/16251

MetaTrader 5 indicator that displays the spread meter on the chart.

Compute the daylight saving time changes (start/end of the summer time).

The good old MT4 indicator! Now for MetaTrader 5.

Trade Transmitter will Transmit Trades from MT5 Demo or Real accounts using CSV Files. Each trade request created manually or by other EAs on MT5 terminal will be automatically transmitted. Positions and orders summaries are also transmitted, so the receiver on the other platform can catch up, in case it misses any of the trade request transmissions. This Code will save your time if you are working on a bridge to copy trades between MT5 and any other platform.

Class to provide simple reading mechanism from MetaTrader set files.

The first really 3D indicator "Moving Average".

A class for easy access to the closed position properties.

Demonstration of Canvas's capabilities using 3D spiral quotes as an example.

This is an indicator w/o buffers which demonstrates parallel multi-threaded calculations in chart objects hosting worker expert adviser.

Just for experiment and to demonstrate the possibilities of Canvas. The price is drawn in the polar coordinate system by winding circles.

Simple code for Candle Cross above or below Conditions..

Welcome to the Binary Testinator. The Purpose of this EA is for testing different Indicators to optimize a trade scenario. Everyone has an opinion on what is the best trade setup, and advice is never ending! Better if you test it out...

Perfect Trend Line 2

By using this indicator you can see the normalized price of any chart! You can use this indicator to find the divergence in the market!

Header with iRSIOnArray function for use with MQL 4 or 5 code.

converted stdlib library for MQL5 from the MQL4

iWPR+ is an iWPR %Range function with a positive value.

The EA uses large volume orders to partially close other orders, with this approach, the breakeven and profit price is much closer to the current price than if you use all orders in the terminal or their full volumes.

This indicator predicts future price movements by searching for similar candle patterns in the rate history.

This is a demo indicator with BPNN neural network library ported from C++ to MQL.

This is a multi-currency expert adviser based on reversal strategy with martingale. Original idea is taken from ExpMartin for MT4.

Opens random positions on marketwatch symbols.

Simple risk management tool.

This script opens a buy or sell order randomly having equally spaced take-profit and stop-loss levels.

Simplified Script to find signals based on user parameters

First script selects symbols having spread below specified value on the marketwatch, then opens corresponding charts by appyling timeframe and template stated.

This script allows a user to find out instance_id of the running MetaTrader instance/installation.

Custom Price Chart using a simple Artificial Neural Network that tries to project price movements into the future. Not very useful for trading, but fun to watch and learn ;)

Indicator calculate the average price

Scans multiple symbols looking for when the price crosses a pivot point or when xxPoints Near or bounce off pivot then it alerts the trader.

Monster Trend indicator that uses data from several time periods.

1...101112131415161718192021222324...183