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

Submit your code

The MACD Coloured Histogram is an enhanced version of the classic MACD (Moving Average Convergence Divergence) indicator, designed to provide a clearer and more intuitive visual analysis of market momentum. This indicator combines traditional MACD functionalities with a dynamic histogram that changes colour based on the relationship between the MACD Line and the Signal Line, allowing traders to quickly identify trends, reversal points and moments of indecision in the market.

EQ

Historical equity of one-time and one-time open virtual positions to analyse the efficiency of spread/equity trading

The X-bars Fractals indicator allows setting the number of bars on the left and the right from fractal. It is good as for local, so for global extremums

This indicator is constructing "bands" using 3 quantile values.

ALMA with floating levels and additional filters.

ZigZag based on the MACDCandle indicator candles.

A channel based on standard deviation of close price.

SAR ADX Signal with mobile notification, rewritten from MT4 version (source no longer found). This is a repaintable indicator, please be careful when using it.

The library contains functions that returns description of runtime error codes and trade server return codes.

Trade functions library designed for use in the code of scripts and Expert Advisors depending on a broker

The Exp_PFE trading system based on the signals of the PFE oscillator.

The Exp_JSatlCandle Expert Advisor based on signals of the JSatlCandle indicator.

The CCI pre-filtered indicator with an addition of 18 possible types of averages that can be used for pre-filtering.

The multitimeframe version of Donchian channel.

The upgraded indicator: now it has new price types and different display type.

T3 velocity is a completely new indicator that uses T3 to calculate velocity.

Dsl (discontinued signal lines) - RSI.

The indicator implements a breakout system using the Mikahekin indicator channel.

Fast Stochastic.

ATR adaptive T3

ATR adaptive smooth Laguerre RSI

This EA will scan all the closed trades and then print the nth trade from the end

High-performmance functions for dealing with time.

Flexible Momentum (MetaTrader indicator) — calculates the change of a currency rate during a given period (in seconds) and displays the result as a number of points and percentage in the main chart window of the platform. It offers highly customizable alerts based on thresholds for maximum momentum in points and percentage. Because this indicator uses ticks history to calculate momentum, it works only in MT5.

Set Auto TP and SL: The “Set Auto TP and SL” (Take Profit and Stop Loss) feature is a crucial tool in any trading strategy, designed to automate risk and reward management. It allows traders to define fixed price levels where a trade should be automatically closed to either secure profits (TP) or limit losses (SL), removing the need for constant manual monitoring. When this feature is enabled, each position you open will automatically include a predefined Take Profit and Stop Loss level based on your custom parameters, such as a specific number of pips, percentage of balance, or technical levels. This not only saves time but also ensures that your trades are protected from sudden market movements and emotional decision-making.

This Expert Advisor (EA) is designed to detect swing highs and lows on the H4 timeframe, then wait for sweeps (liquidity grabs) on the M15 timeframe to trigger buy/sell trades with defined risk management.

Overbought and oversold indicators aim to determine where the price may experience a reversal.

An indicator which features full Smart Money Concept (SMC) + Break Of Structure (BOS) + Change Of Character (COC) + Fair Value Gap (FVG) Detection and Buy/Sell signals.

Candle countdown HUD with trading sessions (UTC), live spread and anomaly detection, daily range vs ADR, and market-closed state with reason (holiday / weekend / session). Holidays calendar included for seven major markets.

Account-level daily loss guardian: when your daily loss reaches a configurable trigger, it closes all positions and pending orders and keeps the account flat until the next daily reset. Limits in percent or money, configurable reset time (server time), draggable visual panel with live gauge, and manual CLOSE ALL / LOCK buttons with click-to-confirm. Works on any broker, symbol, account size and currency — hedging and netting, no DLLs.

P/L Calendar — Monthly Profit & Loss at a Glance. P/L Calendar shows you, day by day, exactly how your account performed this month — so you can spot your best and worst days, track your win rate, and see your trading rhythm without digging through the terminal's history tab.

A faithful MQL5 port of Daniel Bloch's Relative Moving Average framework. It ranks the current close inside its own window's distribution on a [0, 1] scale comparable across symbols, publishing the fractiles, regime classification, and directional consistency as readable buffers.

Locks in the Asian session range on XAUUSD, then places an OCO breakout pair (BuyStop/SellStop) for the London open, with ATR-based stops and risk-percent position sizing. No indicators, no discretion — the range is measured, not guessed.

Prints the invisible contract limits that silently reject orders: stops level, freeze level, min/step/max lot, tick size and value, spread type, execution mode, swaps, and the margin needed for the minimum lot against your free margin.

The Stochastic Oscillator compares where a security’s price closed relative to its price range over a given time period.

ZigZag indicator version with optimized calculation speed.

Signal indicator of the popular BrainTrend1 trading system with preliminary price timeseries smoothing.

This indicator is based on the idea of that an unusual impact in price changes will be adjusted by an inverse reaction.

UltraWPR_HTF_Signal_BG shows information about trend direction based on the data of the UltraWPR indicator on a selected bar as a graphic object with a colored indication of trend or deal direction and gives alerts or audio signals and sends push notifications to a smartphone.

1...181920212223242526272829303132...210