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

Submit your code

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.

This Script & EA enables coders to backtest their news based strategies which use the MQL5 Calendar.

A logger with the ability to log specific modules or code sections

EquiPeak Drawdown Tracker is an indicator designed to monitor and record the maximum drawdown of your trading account in real time. It is not just an alerter of current drawdown; it is especially useful for visually comparing your current drawdown with the maximum historical drawdown you expect or have previously recorded.

MQL5-Like Trade Classes in Python for MetaTrader 5 Python

Trading Gap Weekend, is it profitable?

Monthly VWAP (Volume Weighted Average Price) is an essential MQL5 indicator that calculates and displays the Volume Weighted Average Price for each trading month. It's a powerful tool for understanding long-term market sentiment, identifying key monthly fair value, and informing strategic decisions.

RSI adaptive indicator based on tick calculations

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.

Serialization and deserialization of the JSON format

Creating profit labels on deals (closed trades) which also show in the strategy tester

Kuskus Starlight is an oscillator that utilizes a Fisher price transformation to identify trends and potential reversals. The original MT4 code by Scriptor is available at: https://www.mql5.com/en/code/8365.

Dots (MetaTrader indicator) is based on the 2006 indicator by TrendLaboratory. It displays the current trend direction by placing the dots on the main chart. The blue dots signal bullish trend and the red dots signal bearish trend. Although the indicator doesn't rely on any standard MetaTrader indicators, it uses a call to iMA() (moving average) to get the price values depending on the input price type used (Close, Open, High, Low, Typical, etc.) The calculation is based on the cosine of the angle of price change. Trader can modify several input parameters. The indicator is available both for MT4 and MT5 versions of the platform.

Price Alert MetaTrader indicator — can issue any type of alert when the price reaches certain levels set by a trader. There are three types of price levels: the first one is used when the price rises above certain level (displayed with the green line on the chart), the second one is used when the price falls below certain level (displayed with the red line on the chart), and the third one is used when the price reaches the certain level exactly (displayed with the yellow line). Three alert types include: native (popup), email, and push-notification. For email and push-notification alert features to work, you need to set up the email or MetaQuotes ID settings in your MetaTrader platform options window. The indicator is available for both MT4 and MT5.

Calculate a moving average in one function call. Code that can easily be transported between different projects.

A compound interest calculator for the trader. Calculates, based on your parameters, your risk of ruin, and the optimal risk per trade. Gives a forecast of your capital size in a year, month, and at the end of the term.

A hybrid sorting algorithm that provide fast performance for sorting arrays of simple types, structures or object pointers.

An indicator which attempts to highlight a ranging market area

This is a simple mean reversion EA

This Expert Advisor (EA) helps traders manage risk by automatically adjusting position sizes and stop-loss levels based on market volatility, using the Average True Range (ATR) indicator. The EA calculates the optimal position size for each trade according to a user-defined risk percentage and the current ATR value, ensuring consistent risk exposure across all market conditions. It also offers an ATR-based stop-loss option to adapt to volatility, while employing a simple moving average crossover strategy to open buy trades. Ideal for traders seeking to automate risk management without complex trading logic, this EA prioritizes account protection and simplifies the trading process.

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

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

Tester's single pass data.

The EA only trades buy positions and does not use SL and TP.

This indicator allows you to define a checklist for you to manually check and confirm your strategy before entering into a trade.

A simpler way to display Heikin Ashi

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 very simple, efficient and non-obtrusive clock for your Chart. KISS compliant! :)

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

Calculate the cosine distance and similarity between 2 vectors . The cosine distance is 1-cosine_similarity and the cosine similarity is the dot product of two vectors by their magnitudes multiplied.

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.

Fair Value gaps are used in ICT's smart money concept where there is an imbalanace of 1 point or more between 1st candle's high and 3rd candle 's low in bullish and 1st candle 's low and 3rd candle's high in bearish

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

MACD variation that uses Nonlag MA.

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

Multiple runs/optimisations in Tester.

Provide simplest class to read and parse CSV file

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

It is made more up-to-date and multi time frame option added.

Stochastic that is using RSX as an input for calculations.

12345678910111213...191