Watch how to download trading robots for free
Find us on Twitter!
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 - 95

Submit your code

Trading based on the ZeroLag MACD custom indicator.

An assessment is made based on the values of five indicators (Gator, WPR, AC, DeMarker and RSI). Uses trapezoidal membership functions. Before sending a trade request, it checks if funds on the account are enough.

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

This utility program records tick quotes in the CSV and BIN format. A flexible set of symbols is available for writing.

A trading strategy based on RSI and Bollinger Bands.

A trading system based on the Stopreversal indicator signals.

The script has three independent functions for determining the current FORTS futures.

An Expert Advisor based on "KDJ Indicator"

The Expert Advisor is based on Puria method with a few changes. It uses two iMA (Moving Average, MA) indicators and one iMACD (Moving Average Convergence/Divergence, MACD).

The indicator marks on a price chart candlesticks, which are larger than the specified size. If the candlestick size exceeds the value specified in the indicator parameters, the indicator can show an alert message.

Instead of being in a hurry to follow the price with the stop loss, this indicator is adjusting a proposed stop loss only when it notices a trend change in the opposite direction. That way, it keeps the level intact while trending, and adjusts it when it "sees" that there is a possible trend change) and gives bigger "room" for an order to survive possible whipsaws in trends. Also, since it is estimating a trend, this indicator displays the periods when there is a trend in different color(s) in order to make it easier to decided what to do.

This indicator is a MetaTrader 5 version of nonlinear regression. Nonlinear regression is very "fast" when responding to sudden market changes so the default calculation period is set to somewhat longer period than it is usual for similar type indicator. Because of that some experimenting with period is advised based on your trading strategy and trading style.

Linear regression line with an addition of standard error channel projection.

An Expert Advisor based on indicator Renko Level

Juice is a standard deviation indicator that shows if the deviation is below or above some fixed level. That way it can show if the volatility is increased or not compared to that level.

Increasing a position volume. Entry signal by iDeMarker (DeMarker, DeM) indicator. Regular trailing and trailing by equity.

Grid of Stop and Limit pending orders.

Classic Donchian Channel indicator

Zero Lag RSI indicator

Discontinued signal line QQE - histogram

Volume Wave indicator originally idealized by Richard D. Wyckoff.

TRIX candles

The Expert Advisor based on the BullsBearsEyesindicator custom indicator

Working with pending Buy stop and Sell stop orders. Martingale.

Indicator RSI Rendiment

The EA uses two indicators iMA (Moving Average, MA), Fast and Slow, and one indicator iBands (Bollinger Bands, BB).

Normalized MACD of averages

This code snippet implements a dynamic risk management strategy for existing trades. It focuses on closing trades based on profit or loss thresholds and employs a trailing stop loss to lock in profits as the trade moves favorably. The strategy helps manage risk and enhance profitability in a streamlined manner.

This robot uses a random number generator to simulate simply tossing a coin to decide on the direction of each trade. It provides an example of a minimal expert advisor programmed in an object-oriented style. It also provides a basis for quantifying the value added by alternative methods of entry.

Fine Fractals can show important price curves, highs and lows in the cases where the standard Fractals indicator fails.

Superposition of RSI and DeMarker technical indicators.

Simple script to randomize all colors of your chart. Just click on it and see results yourself!

The indicator calculates perfect market entry signals, which can be used for neural network training.

Point and Figure indicator shown in bars and displayed in the separate window.

The simplest semaphore indicator having alerts and providing the possibility to send signals to a mailbox.

The function that identifies extremums over a given period of history.

Expert Advisor based on three moving averages and exit using Stop Loss or Take Profit. It sets up an entry with the trend.

The simplest script to send instant PUSH-notifications to smartphone

This script attempts to demonstrate the power of using support vector machines in solving classification style problems.

This indicator uses support vector machines to analyse indicator data and signal future trades. Buy trades are signalled by a green ‘up’ arrow with sell trades signalled by a red ‘down’ arrow.

1...888990919293949596979899100101102...188