• Sign up >>

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!

To post a new code, please log in or register

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.

Get the time of the daylight change, (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.

This script opens random position at market price on all symbols having spread below specified value.

BitMEX Trading API Header files and example codes to trade on BitMEX exchange.

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.