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

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

Builds a sliding line with a polynomial of 4 degrees. Extrapolates as a section of a given function with a sinusoid and its axial one. One value is taken from the constructed lines on each bar and a line of extrapolated values is plotted, which does not redraw.

A cross platform library/framework

Exponential moving average

Linear Weighted Moving Average

Advisor scalper. Trading algorithm: Candle[0]> Candle[1] * 2. Taimeframe - 4H && Day.

Simple moving average

Vortex 2

A base class to simplify analyzing trade transactions in MQL5.

This indicator uses the open price for the day, and computes the percent change for that day. Use on any chart TF up to and including D1.

Short description.

Average trend

RSI of parabolic SAR

RSI with CCI for confitrmation

Corrected AMA

Parabolic SAR of average

Buffer-free indicator implemented on iCanvas

Intra-day Keltner channel extended

Intra-day Keltner channel

Intra-day average true range

This class was developed to exchange data between MetaTrader 5 and CSV files. It converts the strings read from the CSV file to double and integer values depending of the type of the columns. Two producers of CSV files are most important for me. The most important producer are spreadsheet programs, i.e. LibreCalc. Manually entered CSV are the other kind of CSV files I had in mind. Be aware that this class do not use the standard library FileCsv.mqh etc. Instead it works with text files. It splits text lines into fields. Maximum speed and low memory usage were no development goals. This class may not be suited for large datasets or time critical operations. I would not use CSV files if speed was my main goal.

Adaptive moving average - double smoothed

Normalized MACD of averages

RSI Summed

Bollinger bands - squeeze

Squeeze - on chart candles or bars

Squeeze indicator

RSI swings

Aroon oscillator - multi time frame version

Aroon - multi time frame version

Set the number of consecutive candles along with RSI level for a valid signal.

Kalman filter - with candles or bars, multi time frame version

This is the version 2 of my script to export the trade history from MT5 selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software. More columns were added and fixed minor errors. The code for processing and exporting data was rewritten.

Kalman velocity - multi time frame version

Short description.

Kalman filter - generalized version

Trix pivots

Rocket RSI pivots

Ssm RSI pivots

Simple support resistance

Simple intraday support resistance

1...121314151617181920212223242526...183