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

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

Modern indicator that displays your daily trading statistics directly on your MT5 chart. Track your trading performance with a beautiful flat design panel showing lots traded, number of orders, and profit/loss for each day.

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.

The Clean Market Watch script is a simple utility tool designed to quickly remove all symbols from your MetaTrader 5 Market Watch window with a single click. This is particularly useful when you want to start fresh with a clean workspace or when your Market Watch has become cluttered with too many symbols. Purpose Over time, traders often accumulate numerous symbols in their Market Watch window, making it difficult to focus on the instruments they actively trade. Manually removing symbols one by one can be tedious and time-consuming. This script automates the entire process, clearing all symbols in seconds.

EA Tools tính toán Margin theo lotsize, có thể tùy chỉnh đòn bẩy

The Open Range Breakout (ORB) indicator is a powerful technical analysis tool that identifies and tracks price breakouts from the opening range of trading sessions. This indicator is based on the concept that the high and low prices established during the first minutes of a trading session often serve as significant support and resistance levels throughout the remainder of the day. The indicator automatically calculates the opening range based on user-defined time periods, plots multiple price targets, and provides visual and audio alerts for potential trading opportunities. It is designed to help traders identify high-probability breakout trades and retest scenarios.

A simple Expert Advisor that trades when the price forms the "Three From Within" pattern.

A volatility filter based on 3 ATR's: a fast ATR, a middle ATR, and a slow ATR

It is a zigzag which creates new zigzag turning points based on passing a volatility threshold

It is a script to display the time remaining until next bar arrives.

Probability Theory Advisor

KopierMaschine is a local copier of trades between different MetaTrader 4 and MetaTrader 5 accounts in any direction located on one computer with an intuitive interface.

This indicator calculates and displays the Exponential Moving Average (EMA) on the MetaTrader 5 chart. Fully customisable period. Allows selection of the applied price (Close, Open, High, Low, Median, Typical, Weighted). Uses the standard EMA formula, initialised from an SMA of the first bars. Can be used as a standalone technical analysis tool or integrated into automated trading systems for trend-following and moving average crossover strategies.

Lightweight CVD (Cumulative Volume Delta) for MT5 — M1-based, shows buy/sell pressure as candles with optional resets.

One of the simpler chips for machine learning

A simple signal indicator based on RSI and Moving Average. Plots Buy/Sell arrows when RSI is above/below 50 and Price is above/below the MA.

WaveWeisBarForce is a custom indicator based on Weis Waves logic. It accumulates volume into directional waves (bullish or bearish) and displays them as histograms with intensity levels. Bullish waves: 4 levels of green, from light to Lime. Bearish waves: 4 levels of red, from light to Red. WaveMax (white): shows the bar with the highest volume inside each wave. WaveClimax (yellow): highlights record accumulated volume across waves. This indicator helps traders visualise market pressure by volume accumulation and wave intensity, improving intraday and swing analysis.

The goal is to show a code that shows the calculation of the ATR with Wilder smoothing

Expert Advisor based on iPinBar Pin Bar Finder + several different trailing indicators

A simple strategy based on the signals of two indicators: Williams' Percent Range (WPR) and Bollinger Bands (BB). A position is opened only when the signals of both indicators coincide.

It signals a period of low market volatility that is about to end, foreshadowing a significant price move.

Function to convert server time from one broker's time zone to another.

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.

MACD Histogram

Another ZigZag. ZigZag

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

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

12345678910...195