Watch how to download trading robots for free
Find us on Twitter!
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 - 11

Submit your code

This indicator detects bullish and bearish engulfing candlestick patterns with an optional volume filter to highlight stronger signals.

Works using a positive lock; the trading robot creates one positive lock, and the trader decides what to do with it.

The script shows the usage of L1 Trend Filter methods in MQL5 for float and double vectors on random walk simulated data.

Hon-Matrix is an advanced algorithmic trading system that combines Price Action, Volatility Analysis, and Real-Time News Filtering. Unlike standard "static" EAs, Hon-Matrix utilises a dynamic decision-making engine that identifies the current market phase (Trending vs. Ranging) and switches its entry logic accordingly. It features a professional-grade on-chart dashboard allowing for live parameter adjustments without restarting the EA, making it a powerful tool for both automated prop-firm passing and personal capital growth.

Constructor for creating histograms of statistical distributions of indicators, timeseries and their derivatives.

Tester's single pass data.

This is an indicator for showing volume profile on the chart, using simple calculations and very fast execution.

Searches for Wick or Body based High low in visible bars of chart

MQL5 version of harmonic moving average

Bollinger Bands with controllable outer band smoothing (post smoothing)

A demonstration on how to modify objects in an indicator without having the source code

A real-time monitoring tool for MetaTrader 5 that displays key financial data, allows quick symbol switching, and customizable symbol lists. Save and reload symbols, reset lists, and customize text and panel colors for a personalized trading experience.

A price increase indicator calculates margin and price changes in per cent.

A dynamic trendline-based evolution of the Donchian Channel

TardioBot V1.05, named after of a historical figure Giuseppe Tardio, is an Expert Advisor designed for MetaTrader 5 that employs a triangular arbitrage strategy.

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

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

This is a RSI of High, Low, Open and Close displayed as color candles in it's own sub-window.

It will delete all objects on the chart when the compiled executable is dragged onto the chart

RSI adaptive indicator based on tick calculations

BreakRevertPro EA merges breakout and mean reversion strategies with adaptive SL/TP and multi-timeframe ATR trailing stops for flexible trading in volatile markets.

A quick little script to make traders' lives easier. The one thing that always annoys me is resetting the properties like colors for a new chart, to make it look the way i like it. So Here is a script to make things smoother.

Trade server disconnect alerts utility for MT5.

Simple_Grid is the simplest "grid" EA.

A very simple, efficient and non-obtrusive clock for your Chart. KISS compliant! :)

Multiple runs/optimisations in Tester.

A simpler way to display Heikin Ashi

Candlestick Fitness concept is used in coding HFT Algos based on population optimization algorithms.

Linear Regression Value indicator

A customized bid and ask line which is labelled and clear to help visualize the bid and ask prices

An MQL5 Expert Advisor that reacts to high-impact forex news events using the MQL5 Calendar. It identifies news related to inflation (CPI/PPI) and interest rate decisions, placing breakout trades with pending orders. Ideal for traders looking to automate news-based strategies. (This is just a starting point)

Professional trade management panel: one-click Buy/Sell with auto lot sizing, smart trailing stop (ATR/Fixed/Candle), automatic breakeven, multi-TP partial close system (TP1/TP2/TP3), and one-click pending orders. All-in-one order management for serious traders.

A lightweight, essential utility for ICT and SMC traders. It automatically plots the True Daily, Weekly, and Monthly Open prices, serving as the foundation for the Power of 3 (Accumulation, Manipulation, Distribution) concept.

This class allows you to create buttons on the chart as if they were chart objects(have time and price coordinates) these objects can be dragged on the chart and when scrolling they stay at the same place. If you wan't to learn some Object Oriented Programming or if you wan't to understand how chartevents work or you wan't to create graphical interfaces, you can learn a lot from this.

adoption of Larry William's method using AI Time-Series XGBoost

MACD variation that uses Nonlag MA.

Provide simplest class to read and parse CSV file

Static class to fix the TimeGMT() function during testing in the strategy tester.

The Efficiency Ratio (ER) was first presented by Perry Kaufman in his 1995 book "Smarter Trading". It is calculated by dividing the price change over a period by the absolute sum of the price movements that occurred to achieve that change. The resulting ratio ranges between 0 and 1 with higher values representing a more efficient or trending market.

The indicator displays the current spread and the time till closing the bar (candlestick) at the same time.

1...456789101112131415161718...199