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

Submit your code

Three timeframes RSI Average

Rsi slope divergence

Indicator Multi timeframes Stochastic RSI

An Expert Advisor for placing Stop Loss and Take Profit.

Super smoother RSI

Adaptive Movinga Average - generalized version

First script selects symbols having spread below specified value on the marketwatch, then opens corresponding charts by appyling timeframe and template stated.

Just for experiment and to demonstrate the possibilities of Canvas. The price is drawn in the polar coordinate system by winding circles.

The good old MT4 indicator! Now for MetaTrader 5.

This indicator for Breakout Strategy. It doesn't print objects on the chart.

Allows you to easily visualize bullish and bearish periods confirmed by the zigzag indicator using vlines. You can control the display of the zigzag, choosing to start from the beginning of the chart or from a certain number of bars, as well as the display of labels showing the price of the peak or trough, the direction of the past period, and its amplitude in pips. Of course, it works on the main window as well as on sub-windows. WARNING!!! This is a valuable aid to understanding and calibrating indicators and developing strategies, but it is not intended for direct use. Translated with DeepL.com (free version)

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.

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.

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.

Choppiness Index: another way of calculating fractal dimension.

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

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.

1...515253545556575859606162636465...194