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

Submit your code

The ColorCandlesDaily indicator draws candles with different colors depending on the day of the week.

TEMA can be used instead of traditional moving averages. It can be used for smoothing price data, as well as for smoothing other indicators.

An Expert Advisor, based on the "Puria method" Forex Strategy.

This Expert Advisor uses the Index Moving Average indicator.

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

The indicator shows the moments of the market acceleration. Besides, it indicates appropriate time for buying, selling and market exit.

Comparative study of sorting algorithms.

Inspired by Pirat's Expert Advisor submitted to the Automated Trading Championship 2011.

Digital filtration of the variation indicator.

The script calculates candles statistics (the minimal, maximal and average values of candles body and shadows) of the current chart.

A simple script that allows you to open a Short position using the current price location with a specified Risk Percentage and Reward Ratio.

The linear regression line with data placed in the indicator buffer.

The indicator shows information about size of candle in pips and size of the shadow too.

The indicator of price levels with round numbers 00, 20, 50, 80.

Trading system using the Ozymandias indicator.

Another version of the RSI using smoothed prices.

Middle-High-Low Average - a correlation of two averages.

The Exp_SilverTrend_Signal_ReOpen trading system based on the signals of the SilverTrend_Signal indicator with scaling by the trend.

Trading on a new bar only. The rules are simple: if MAIN_LINE MACD (1) > MAIN_LINE MACD (2) -> Buy, if MAIN_LINE MACD (1) < MAIN_LINE MACD (2) -> Sell". When a signal opposite to open positions is received, close all positions.

A set of thirty popular candlestick patterns.

An indicator for displaying ATR (Average True Range) value in pips or points with option for setting multiplier.

Trading by RSI and Moving Average. Moving Average is used as a trend filter on H1.

Trend Trigger Factor indicator ported to MQL5 from wrongly coded version for MetaTrader 4.

The MFI normalized indicator

The Expert Advisor uses four iMA (Moving Average, MA) indicators from two timeframes. Two indicators with averaging periods 1 and 8 are created on the H1 timeframe and two indicators with averaging periods 1 and 8 are also created on the H4 timeframe.

This indicator shows trend line and channels using the BSI Indicator. Original work of https://www.mql5.com/en/code/13615

SMC/ICT market-structure indicator for MT5: swing highs/lows, BOS (continuation) and CHoCH (reversal) confirmed on close, Order Blocks, Fair Value Gaps, and QML (Quasimodo) levels. Every feature is toggle-able, with adjustable swing sensitivity and colors. Works on any symbol and timeframe.

This Expert Advisor allows you to save infomation about the ticks, actual or simulated in Strategy Tester.

This indicator is a combination of moving average and ATR indicators.

The indicator plots a channel using the linear regression model: y=b+a*x.

This Expert Advisor performs the synchronization of charts.

Trade signals based on "Dark Cloud Cover/Piercing Line" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Stochastic Oscillator equivalent with a minimum lag.

Moving average indicator with the linear regression smoothing algorithm.

Center of gravity is the oscillator developed by John Ehlers and presented in the "Stocks & Commodities" magazine (May, 2002).

The variant of the ZigZag indicator optimized by its operation rate.

The indicator builds the trajectory of the front linear regression and standard deviation points.

BB XMACD is a simple MACD indicator variation.

This indicator is designed for measurement of a financial asset price change periodicity. Cycle Period allows to create adaptive versions of oscillators.

Non-linear regression with interpolation of a price chart future values.

1...616263646566676869707172737475...206