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

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

Use protect profit after open position

You can identify buy trend and sell trend with this indicator

This EA demonstrates creating and saving a graphic chart using data from the MT5 Strategy Tester.

MACD zero line cross color candles with alerts for Metatrader 5

The HighPass - LowPass Roofing Filter was created by John Ehlers (Cycle Analytics For Traders pg.78)

Use the intersection of two moving average lines to draw a vertical line.Then You can simply read the current market pattern

After the three average lines are arranged completely according to high and low, it can be regarded as a trend formation. After the pattern is destroyed, the hatching is no longer drawn Under the condition of no hatching, it is regarded as an indeterminate period

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

Script to download EVZ data for Euro FX Vix indicator

Fibonacci Channel with Quartile Trendline Levels

The Fisher Transform Indicator was created John Ehlers "Cybernetic Analysis For Stocks And Futures".

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

This is a simple script that Closes all Orders and Positions available

Shows Last Price, Daily percentage change and Time based on Input selection to the Price Line

"The Fisher Stochastic Center Of Gravity" was created by John Ehlers (УCybernetic Analysis For Stocks And FuturesФ , pg.95)

Simple class for getting the number of microseconds (µs) elapsed since January 1, 1970

& moving average , two rsi filters.

awesome oscillator, stochastic filter. expert

Volume Colored Candlestick with Bollinger Bands as the Standard Deviation

Expert

3 fibo levels.

Volatility indicator

A version of ATR adaptive smoothed Laguerre RSI that does not use any built in function

ATR adaptive smoothed Laguerre RSI 2 (extended)

Optimized ATR adaptive Laguerre RSI

trending breakout

pips in time

"The Enhanced Signal To Noise Ratio" was created by John Ehlers and published in the book "Rocket Science for Traders", pg.87-88.

Calculates Brokerage, Commission or Slippage based on the Input on the strategy Tester

The Momentum-based Adaptive Channel is a version of the adaptive channel based on the Euclidean distance. It is designed to adapt according to the dynamic market as needed.

A collection of useful string manipulation functions.

Buy Sell on your price, Choose Market order, Pending Limit order or Pending Stop Order

macd divergence and rsi filter

Colored Candlestick exemplifying a gradient. It was somewhat hard to find a good working example of DRAW_COLOR_CANDLES that was understandable, most of the comments were useless, and the documentation lacks to even specify the plot limitations (PLOT_COLOR_INDEXES being limited to 64 in length, [0; 63]) or which order the functions should be called.

closing partially script and Stop loss to Break Even point

Risk Reward Tool calculates Risk reward like 1:2 1:3 1:4 and 1:5

This oscillator can be used as a handle to judge a Moving Average's trend speed, based on this specific product's past trend history.

This script draws Fibonacci Expansion OBJ_EXPANSION with options to add your own custom values

This script draws Fibonacci Fan OBJ_FIBOFAN with options to add your own custom values

This indicator is used to have a sense of and distinguish a product's statistical property: Moving Average Speed

1...456789101112131415161718...183