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

Submit your code

An indicator which attempts to highlight a ranging market area

This is a simple mean reversion EA

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.

Export history of closed positions from MT5 retail hedging account selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software.

Recursive Median Oscillator - with floating levels

Here is my implementation of a colored Hull Moving Average.

The EA opens positions randomly (50/50 chance for Buy or Sell) when no position is open.

This is a script to print all open trades and their PnLs at a specific time in history.

Show candle gain and candle loss in percent.

This is an indicator to calculate ATR Weighted moving averages.

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

Linear Regression Value indicator

is a text for the neutral network would like to know your opinion.

A smoother line chart which cuts out a lot of the market noise and uses volume in the formula

It is an indicator used to determine the trend, support and resistance level of the market. When volume data is available, it calculates using MFI, if not, it calculates using RSI. Momentum: RSI and MFI Volatility: ATR

The Trend Equilibrium Indicator TrendEQ dynamically analyzes market movements by combining momentum and volatility. By scaling momentum with the market’s volatility, the TrendEQ provides a reliable measure of trend strength and direction.

Bollinger Squeeze Basic MetaTrader indicator — is a complex indicator based on Momentum, Bollinger bands, and Keltner channel. The indicator is drawn in the separate window of the chart as a Momentum histogram and a range of dots when show the relationship between the current Bollinger bands and Keltner channel values. This indicator is available for both MT4 and MT5 versions of the trading platform.

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.

Gain/Loss Info MetaTrader indicator — displays the gains and losses for all candles where the given threshold is surpassed. The values are calculated in points and percentage. The indicator can calculate gain/loss in two modes: plain candlestick Close and Open difference, and as difference between current Close and previous Close. You can set minimum change limits (for pips and percentage), change modes, and you can also control font color of the output numbers. The indicator is available for both MT4 and MT5.

Keltner Channel (MetaTrader indicator) — is a classical technical analysis indicator developed by Chester W. Keltner in 1960. The indicator is somewhat similar to the Bollinger Bands and Envelopes. It uses three plot lines: the middle line is the 10-day simple moving average applied to the typical price ((high + low + close) / 3), the upper and the lower bands are produced by adding and subtracting the moving average of the daily price range (High and Low difference) from the middle line. This way, a volatility-based channel is built. In this version of the indicator you can modify all the parameters of the MA. The indicator is available both for MT4 and MT5 versions of the platform.

Pinbar Detector is a MetaTrader indicator that tries to detect Pinbars (also known as "Pin-bar" or "Pin bar") and marks them by placing a "smiling face" symbol below the bullish Pinbars and above the bearish Pinbars. It is a pure price action indicator, which is not using any standard technical indicators in its code. The configuration of Pinbar detection can be done via the indicator's input parameters. Pinbar Detector can issue platform alerts and email alerts on detection. The indicator is available both for MT4 and MT5 versions of the trading platform.

12345678910111213...190