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 - 7

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
latest | best

A Sample of Averaging Up/Down Martingale EA.

represent an operation to be performed on the elements of an object structure. visitor lets you define a new operation without changing the classes of the elements on which it operates

define the skeleton of an algorithm in an operation, deferring some steps to subclasses. template method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure

Print info about a closed position by its position ticket or identifier.

Stock trading indicators. BIAS.

ADR,AWR,AMR,Draws Average Range Lines

define a family of algorithms, encapsulate each one, and make them interchangeable. strategy lets the algorithm vary independently from clients that use it

Reflex and Trendflex was created by John Ehlers ("Stocks & Commodities Feb. 2020 (6-8)").

Draws Pivot Points Level Lines for formula's Floor,Fibonacci,Camarilla,Woodie

The Stochastic RSI indicator (Stoch RSI) is essentially an indicator of an indicator. It is used in technical analysis to provide a stochastic calculation to the RSI indicator. This means that it is a measure of RSI relative to its own high/low range over a user defined period of time. The Stochastic RSI is an oscillator that calculates a value between 0 and 1 which is then plotted as a line. This indicator is primarily used for identifying overbought and oversold conditions.

The 8 effective steps to build a robust day trading plan using Fibonacci retracement

This is a module for MQL5 Wizard and Standard Library, which allows you to generate expert adviser based on arbitrary set of indicators and conditions.

allow an object to alter its behavior when its internal state changes. the object will appear to change its class

Doulble MA Cross Draw Histogram MT5

An (optional) include file to enhance error code handling experience.

Indicator Camarilla Points "Stocks & Commodities V. 31:3 (pg. 10-15)"

An (optional) include file to enhance debugging experience.

define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically

Indicator "The 2 Pole Butterworth Filter". was created by John Ehlers ("Cybernetic Analysis For Stocks And Futures", p. 192)

define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically

Keltner channel with standard averaging and averaged over the ATR indicator.

This strategy is the well known set & forget with the ALERTING system. It is very useful on different trading scenarios. I urge you guys to always use trading tools that will make your live easier. So instead of watching the charts and the time and all day long, you can use this indicator that will watch the charts for you.

Trend indicator

without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later

McGinley dynamic (official version - as described by John R. McGinley)

Minimum / maximum support resistance zones

For day traders. 2 highly important indicators to turn strategies into extreme winning ones. The Win/Loss ratio and the Reward/Risk ratio will allow us to identify the best times and days our strategy works the best

Define an object that encapsulates how a set of objects interact mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently

For day traders, this is one of the important thing to consider in order to improve our strategy by calculating on average how much an asset moves, in which it will allow us to identify the best TIME during the day to trade when the market moves the most as well

Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation

Indicator DayPivotPoint System with Signal and Alert for MetaTrader 5

Given a language, define a represention for its grammar along with an interpreter that uses the representation to interpret sentences in the language

This is one of the important thing to consider in order to improve our strategy by calculating on average how much an asset moves, in which it will allow us to identify the best days to trade when the market moves the most as well as the worst days to trade in order to prevent trading during these days.

A logging library similar to Log4j but for MQL.

Gann high/low activator (oscillator)

The Gann High Low Activator Indicator was described by Robert Krausz in a 1998 issue of Stocks & Commodities Magazine. It is a simple moving average SMA of the previous n period's highs or lows.

Encapsulate a request as an object thereby letting you parameterize clients with different requests. Queue or log requests, and support undoable operations

Most traders keep losing money because they focus on money rather than planning their trades based on Percentage risk.

Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it

1234567891011121314...176