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

Submit your code

Easy Trend Visualizer is a MetaTrader indicator that does exactly what its name says. It shows where the trend begins, where it ends, and where there is no trend at all. It is based on standard MetaTrader ADX (Average Direction Movement Index) indicators and works quite fast. Easy Trend Visualizer displays itself in the main chart window. It offers a range of alerts: horizontal line appears, horizontal line cross, arrow up, arrow down, previous horizontal line cross (PHLC). Available for MT4 and MT5 platforms

Support and Resistance MetaTrader indicator — as the name of this indicator suggests, it displays the support and resistance levels. It shows them directly on the chart, providing an easy help when you want to set stop-loss or take-profit level, or when you want to see the next market target. This indicator uses the standard MetaTrader Fractals indicator (by Bill Williams' method) and has no changeable input parameters. This indicator is available for MetaTrader version 4 and 5.

A zigzag indicator that uses a single input to adjust the step size for detecting wave direction changes

This MQL5 custom indicator detects divergences between price action and the Awesome Oscillator (AO), signalling potential market reversals or continuations. It plots buy/sell arrows on the chart, displays the AO as a histogram, and draws trendlines to highlight divergences.

Indicator that displays the day's trend at any chart time. You can customise the colours and position of the text on the screen.

Good afternoon everyone) First time posting my code!!!

Countdown is an advanced indicator designed for traders who want to track the time remaining until the next candlestick or the next market open clearly and efficiently. With three flexible display modes (commentary, chart borders or next to price), this indicator offers a customisable solution to suit your trading needs.

The XMA_Ishimoku indicator with additional trend strength indication using colored dots based on the standard deviation algorithm. The original code in the attached link had plotting problems.

This EA is meant to impose a few rules to manage baskets.

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.

This indicator is a utility that shows labelled trade levels on any chart. If you want to replace your native trade levels on a native chart, then turn off "Show trade levels" in your F8 Chart Properties and attach this indicator. If you want to show trade levels on a Custom Chart (where native trade levels cannot be shown), then simply attach this indicator. BaseSymbol - specify the Symbol from which the trade level data will be pulled--handy for unique Custom Symbols. TextBarsBack - specify the number of bars back in history from the current bar where the level labels will be drawn. Note: Although magic number is referenced in the code, it is not presently included in the trade lines. If you're running multiple EA's on the same Symbol, you can edit the code to show magic numbers and then run multiple instances of the indicator on one chart. You can also edit the font sizes and text spacing in the object properties as needed for different display resolutions.

Combines a Moving Average with ATR-based upper and lower bands to act as a trend filter and volatility channel.

The indicator displaying multi level of ATR Channel.

Weekly VWAP (Volume Weighted Average Price) is a powerful MQL5 indicator that calculates and displays the Volume Weighted Average Price for each trading week. It's a crucial tool for identifying weekly fair value and understanding the underlying sentiment over a longer timeframe.

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

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.

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.

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.

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

The script removes all autotrading icons from the current chart

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.

MACD Histogram

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.

A simple indicator based on Bollinger Bands showing its narrowing and widening phases with red/green colours.

Tillson T3 with EMA calculations done without auxiliary indicator buffers.

DeltaFusion Lite is the simplified version of the DeltaFusionPro indicator for MT4. It calculates and displays Cumulative Delta and Net Delta, giving traders a clear view of buying and selling pressure within each candle. By analyzing the distribution of volume between bid and ask, it helps identify market sentiment shifts, potential reversals, and various types of divergences between price and volume.

Fox Wave Clean - Professional Order Manager Professional EA for efficient trade management with one-click position control. Clean design, powerful functionality.

RMA Relative Moving Average is a variant of EMA

Set TakeProfit by just dragging and dropping script on the desired price level.

Keltner Channel for traders or young developers by William210

This Script collects all MQL5 built-in indicators buffers and stores them in a CSV file for analysis purposes

Structure of input parameters

This EA is a demonstration of how you can implement your own Hedging strategy with the help of the include file.

main point is changing of MA curve to horizontal line and DPO curve shall represent to distance from close price to zero level or MA curve

This is an indicator that combines swing high/low and Fibonacci Retracement to identify potential buying zones.

Time-related functions for empirical detection of server time zone and daylight savings mode (DST) from history of quotes

This code provides a simple function for sending push notifications to your mobile device whenever trades are opened or closed in MetaTrader 5. It's designed for netting accounts (where only one position per symbol is allowed).

Prototype for data collection. Dummy buffers for the data window (for data collection purposes) for the hour of the day, and an additional buffer for the hour of the day. Comments the hour of the day.

This script was developed for displaying saved Strategy report from the Strategy Tester into a chart.

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)

123456789101112...194