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

Top MQL4 and MQL5 source codes based on user ratings

Submit your code
PNG

Forget about BMP files like a bad dream. Thanks to this library, you can now use the PNG format, which has a number of advantages, such as being more compact without losing image quality and maintaining transparency.

In the fourth part of the book, we will focus on mastering built-in functions (MQL5 API) and will gradually delve into specialized subsystems. Any MQL5 program can utilize a plethora of technologies and functionalities. Therefore, it makes sense to begin with the most simple and useful functions that can be utilized in most programs.

The Heiken Ashi indicator with no repaint or repaint mode input option.

This script helps traders understand the distribution and breadth of candlesticks over a specific period, which can be useful in making trading decisions such as which Take Profit or Stop Loss to use based on historical values.

Another ZigZag. ZigZag

Unfortunately, I discovered that some brokers are a bit sloppy with the server time change due to the daylight saving time (DST), which I did not expect and which surprised me a lot. Here is a script with which anyone can check their broker.

A set of classes for automatic moving of StopLoss of open positions by fixed indentation or by values of Parabolic SAR and moving averages indicators, or by specified position stop level.

A system to test up to four indicators concurrently in the strategy tester

combination of many familiar indicators for beginner traders

Calculate DST for USA, EUR, AUD and RUB and the offset time of the broker automatically from the 70's until 2030 - even in the Strategy Tester of MQ.

The final seventh part of the book discusses the advanced capabilities of the MQL5 API, which will be useful when developing programs for MetaTrader 5. These include custom financial symbols, built-in economic calendar events, and general-purpose technologies such as networking, databases, and cryptography.

This indicator displays current events on the chart and allows you to export the calendar to archives for backtesting, automatically fixing time discrepancies between the history of bars and the history of events. This is an improved version of CalendarMonitorCached indicator from the algotrading book.

In Part 5 of the book, we'll delve deeper into the APIs associated with algorithmic trading, including financial data analysis and processing, chart visualization, automation, and user interactions.

Working with keyboard data

A simple comment.

Highlights the Forex Market Sessions (Sydney, Tokyo, London, New York).

The SuperTrend Indicator is a dynamic trend-following tool based on ATR. It plots a colored line above or below price to indicate bullish or bearish conditions. When the price crosses the line, a signal arrow appears. Fully customizable with ATR period, multiplier, arrows, labels, and colors. Suitable for all instruments and timeframes. Ideal for scalping, swing, and intraday trading. Combine it with other indicators for stronger setups.

The indicator searches the chart for Price Action patterns "Pin Bar" and puts icons on the bar with the found pattern.

This is an OHLC candlestick chart which records the highest ask and lowest bid on each new bar

Part 2 "MQL5 programming fundamentals" is an introduction to the key concepts of this programming language. This part of the book is devoted to data types, identifiers, variables, expressions, and operators. You will learn how to combine different instructions to form the program logic.

AO - Awesome Oscillator - without iAO() beginner tutorial to learn how to code in MQL5

Candle Replay Magnifier visually replays historical candles over the current chart area for comparative analysis. This indicator overlays past price bars from a selected date onto the live chart, allowing traders to study candle patterns, volatility, and structure in real time. Includes dynamic range highlighting and detailed tooltips showing open, high, low, close, range, direction, time, and volume for each replay candle.

Professional Telegram Bot integration library for MetaTrader 5. Complete solution for sending trading signals, screenshots, reports, and real-time notifications to Telegram channels and groups.

The indicator implements one of the non-linear smoothing algorithms

Rsi without Irsi() beginner tutorial to learn how to code in MQL5

Idea by Andrey F. Zelinsky, based on an indicator by William Blau

This library is an updated version of the ErrorDescription.mqh library published by MetaQuotes, with some features included.

An example of a bot with an embedded machine learning model that is trained in python and saved in ONNX format.

Correlation Coefficient" indicator

The AutoCloseOnProfitLoss Expert Advisor (EA) is a powerful automation tool for MetaTrader 5, designed to close all open positions when predefined profit or loss targets are reached

A powerful and feature-rich JSON library for MQL5, designed to bring a modern development experience similar to Python/JS

Overlaying multiple stochastics with different periods will help beginner traders.

The indicator allows you to estimate the probability that the price has reached its maximum or minimum.

Records ticks in real ticks mode and reads them in maths mode calling your strategy with each tick.

A JSON library that supports MQL4/MQL5

A multi timeframe version is available with colors for orientation, for developers or profitable traders for free. Offer under conditions. Other multi timeframe indicators are also available.

This indicator helps user estimate the potential price movement for the current day, based on 20 days historical data and market trends.

WeekDays indicator displays Day Of Week, Week Of Year, Day Of Year or Bar Index in the Data Window, and optionally in labels on the chart.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194