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

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

This indicator calculate count of one direction movement in selected period.

It's the classic zigzag with a timeframe input to display a HTF zigzag on a LTF chart

A service for MetaTrader 5 that creates a synthetic custom symbol "USDX.synthetic" reflecting the US Dollar Index (DXY) in real time.

The script removes all autotrading icons from the current chart

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

Modification of the standard indicator Fractal

A simple information indicator that shows the remaining time until the bar closes, as well as the time elapsed since the bar opened and the current time.

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

Complete Telegram integration for MT5. Send trading signals, screenshots, reports & alerts to Telegram channels. Includes queue system, multi-channel support & risk management.

A candlestick chart which connects the ask price and bid price to the high and low of the candles

This is an auxiliary take profit and stop loss tool, which can help you to tight stop loss and dynamic take profit. Updated

A tool to align the trading sessions names with broker server time, and local time

A combination of many known indicators

I share my code for expert advisor babi ngepet

CandleMove - Pips & Percentage Movement Display A visual tool that helps you quickly gauge the strength of each candle by displaying its price change directly on the chart.

A channel which calculates local highs and local lows with volatility-adjusted lines

Simple_Grid is the simplest "grid" EA.

A simple yet effective RSI indicator that monitors overbought and oversold conditions on any symbol and timeframe. Sends instant alerts via pop-up and mobile notifications when RSI crosses your defined thresholds.

Quantum System - Uses quantum states and probabilities to make decisions.

PriceVar% is an indicator designed to measure the percentage difference between the price and a moving average, highlighting the strength of the market movement in relation to a reference value.

The Balance of Power (BOP) is an indicator originally developed by Igor Livshin in 2001 to measure the balance of power between buyers and sellers during each candle.

This is a tester script that extends the standard MetaTrader 5 optimisation capabilities, allowing you to evaluate strategies according to complex user-defined criteria (with separation into in-sample and out-of-sample periods, advanced metrics and statistical tests).

Showing different ways of the Aroon values calculation

This MQL5 indicator identifies Upward (Bullish) and Downward (Bearish) Pinbars, displayed with customizable arrows (lime for upward, red for downward). It allows fine-tuning of detection parameters like tail body ratio and protrusion. Pop-up and push notification alerts signal new pinbars. Ideal for traders seeking precise reversal pattern detection.

simple atr supertrend with rsi filter

Overlaying multiple stochastics with different periods will help beginner traders.

Allows you to easily visualize bullish and bearish periods confirmed by the zigzag indicator using vlines. You can control the display of the zigzag, choosing to start from the beginning of the chart or from a certain number of bars, as well as the display of labels showing the price of the peak or trough, the direction of the past period, and its amplitude in pips. Of course, it works on the main window as well as on sub-windows. WARNING!!! This is a valuable aid to understanding and calibrating indicators and developing strategies, but it is not intended for direct use. Translated with DeepL.com (free version)

The RSI Engine EA is a highly versatile automated trading robot for MetaTrader 5, designed to execute trades based on signals from the popular Relative Strength Index (RSI) indicator. Version 2.1 features optimized signal processing and enhanced stability. The EA provides a flexible framework with multiple RSI-based strategies, confirmation filters, and comprehensive trade management settings, making it suitable for both novice and experienced traders.

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.

Introducing MP by SPLpulse, a sophisticated and highly versatile Expert Advisor designed for the modern trader. Whether you are a scalper, a trend follower, or a reversal trader, MP by SPLpulse combines multiple trading strategies with an institutional-grade risk management suite to adapt to your unique trading style. Take control of your trading with unparalleled customization and powerful automation.

The WaveTrend Indicator (WT) is a powerful technical analysis tool designed to identify trend direction and potential reversal points. It plots two lines, WT1 and WT2 , in a separate window, calculated based on price momentum and smoothed averages.

A stripped-down (signal line only) version of Metaquotes' MACD indicator from the MT5==>Indicators==>Examples folder.

This powerful tool filters the classic RSI through a moving average, providing a smoother, more reliable signal line for pinpointing entries, exits, and trend direction with unparalleled clarity.

Instantly calculate the profit and loss potential of your trades directly on the chart. An essential tool for agile and precise risk management.

Intelligent position protection with one-hedge-per-position logic. Features magic number separation, cooldown timer, and max hedges limit. Prevents infinite hedging loops. Free MIT license.

Provide simplest class to write CSV file

Fractal with CCI Filter - Indicator that combines traditional fractals with the CCI filter to reduce false signals. Shows red arrows above the candles for bullish fractals (sell) when the CCI is above the configured threshold and green arrows below the candles for bearish fractals (buy) when the CCI is below the negative threshold. Perfect for identifying reversal points with greater reliability.

Modified standard ZigZag indicator with the addition of information about wavelength in pips, levels and different alerts logic

Adaptive CCI - Commodity Channel Index with dynamically adjusting upper and lower limits based on market volatility. Eliminates fixed thresholds (like 100/-100) by using EMA-smoothed peaks and troughs, providing more reliable overbought/oversold signals tailored to each asset's current volatility. Perfect for identifying high-probability reversal points with adaptive confirmation levels.

Logify is a logging library for MQL designed to simplify debugging, tracking, and monitoring of EAs and indicators. It provides structured, customizable, and organized logs directly on the chart or in the terminal, with support for log levels, flexible formats, and multiple handlers. A lightweight, elegant solution that is easy to integrate into your MQL projects.

123456789101112...196