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

Top MQL4 and MQL5 source codes based on user ratings - 76

Submit your code

MT5 (MQL5) Version of Position Size Calculator - Based on VP Money Management rules This version has been tested and works in both versions; in MT4 (MQL4) as well as in MT5 (MQL5). See the original MT4(MQL4) only version here: https://www.mql5.com/en/code/23886 NOTE: I'm aware there appears to be an issue with the volume calculation and cross currency exchange rates. I'm working on fixing these issues.

This utility is not a trading or market information utility. This will likely only interest those writing (or debugging) indicators using multiple timeframes and collecting information using Bars (or iBars) and CopyRates. The utility creates a list showing the number of Bars reported by the "Bars" function and shows the success of CopyRates for any selected bar by displaying that bar's time from the collected data (or, it shows the error).

Trading the STRONG against the weak!

Regression Channel with variable polynomial degree - indicator for MetaTrader 5.

provides clear arrows which clearly show the direction of the currency pair.

Click on candlestick to see its body range, high low range, upper wick range and lower wick range value.

MQL5 version of geometric moving average.

The Swing High/Low Identifier for MetaTrader 5 marks significant swing highs and swing lows directly on your chart with color-coded arrows. This tool helps traders quickly identify key price levels, which can serve as resistance and support, and is ideal for trend reversal analysis, support and resistance mapping, and enhancing price action strategies. By highlighting these crucial swing points, it provides valuable insights for making informed trading decisions and optimizing trading strategies.

Interface for implementing asynchronous execution of algorithms

3rd Generation Moving Average is an advanced version of the standard moving average (MA) indicator for MetaTrader. It implements a rather simple lag-reducing procedure based on the longer MA period. The method was first described by M. Duerschner in his article Gleitende Durchschnitte 3.0 (in German). The presented version uses λ = 2, which provides the best possible lag-reducing. Higher λ increases similarity with the classic moving average. The indicator is available for both MT4 and MT5. It does not require using any DLL

Detrended Price Oscillator (MetaTrader indicator) — a version of the price oscillator based on the difference between the current price and the simple moving average shifted by (Period / 2) + 1 bars. Unlike the stochastic oscillator, this indicator aims to show the short-term trend changes (price waves inside the long-term trend). The indicator is displayed in the separate window of the chart. You can use this Detrended Price Oscillator (DPO) indicator in both MT4 and MT5 versions of the platform.

This MetaTrader 5 (MT5) custom indicator, boomSpikeBoxMitigationFinal.mq5, detects a specific bullish spike pattern on the chart and marks entry zones using rectangles and horizontal lines. Once the price returns to ("mitigates") the entry level, the entry line is shortened to the mitigation point.

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.

The ColorBars Indicator paints bars with different colors depending on the volume changes. If the volume has increased, the color is green, overwise the color is red.

The example of button, created using the object of OBJ_BITMAP_LABEL type.

Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Hammer/Hanging Man" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The strategy is following: when outer (outside) bar appears, it checks the fact of the inner bar breakthrough in trend direction and generates a signal to open position. A module of trade signals is compatible with the new version of MQL5 Wizard.

This indicator solves an issue of the use of digital filters in the client terminal.

The indicator for multi-currency technical analysis based on the related financial assets resonances.

More smoothed Momentum with colored indication of the current trend.

The DailyPivot Points indicator helps to compose a picture of market future movements, in distinct from the other tools that hang behind the market.

The library provides simple matrix operations: addition, subtraction, multiplication, inversion.

The CWPROnArray class is intended for calculation of Williams' Percent Range (%R) on indicator buffers. The example of use of the class is provided.

CCCIOnArray class is designed for calculation of Commodity Channel Index (CCI) values on indicator buffer. The example of use of the class is provided.

ZigZag indicator version displaying results of its calculations from the larger timeframe at the current one.

Two rectilinear channels of standard deviations + curvelinear channel of the parabolic regression with interpolation of a price chart future values.

The semaphore signal indicator with the values based on five technical indicators: LWMA, SMA, RSI, Stochastic, MACD.

XLineRegression creates levels based on the linear regression algorithm.

The class is designed for calculation of the technical indicator Moving Average of Oscillator (Moving Average of Oscillator, OsMA) using the algorithm of the ring buffer.

The script for searching the maximum, minimum and average values of candlestick size

A trailing stop module based on the WPR indicator with short and long Stop Loss

When you drag this script onto the chart, it will calculate the price where you drop the script and use this price to figure out if a Buy Stop or Buy Limit pending order should be placed.

A trading system that uses the Candle Momentum indicator.

The indicator plots three equidistant channels with the calculation periods defined in input parameters.

The Fractal Dimension Index determines the amount of market volatility.

The JMASlope indicator with the timeframe selection option available in input parameters.

A set of Pivot levels.

Symbol for downloading the history data for the current symbol with indication of progress.

The Bezier indicator with additional trend strength indication using colored dots based on the standard deviation algorithm.

1...697071727374757677787980818283...195