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

Submit your code

Directional smoothed momentum (momentum of averages)

A trading system based on the signals of indicator i-KlPrice_Vol

An indicator that shows buy and sell signals of three indicators (iSAR, iWPR, and iMA) on nine timeframes with full settings

A redrawing channel, which looks into the future by a certain amount of bars specified in the appropriate input parameter

Center of Gravity - extended version

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.

Set three crosses and monitor the daily percentage performance starting from a given time (that can also be set).

Breakout Trader 1.0 trades breakouts from the range.

Better Volume is an advanced indicator designed to analyse the behaviour of volume on price charts. It combines volume information with metrics such as candlestick range and moving averages to identify important patterns in the market, such as buy/sell climaxes, churn and weak candles. With its dynamic visual interface and volume categorisation, the indicator offers valuable insights for traders who want to make informed decisions based on volume flow.

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)

Prime Quantum AI is an MT5 Expert Advisor combining a classical pre-filter (ADX + Alligator) with AI vision-based chart confirmation from major AI providers (Anthropic Claude, OpenAI GPT, Google Gemini, DeepSeek, xAI Grok). When the pre-filter detects a trend setup, the EA captures three adaptive- timeframe chart screenshots and sends them to the configured AI provider, which returns direction, confidence, stop-loss and take-profit. A trade is opened only when the AI confirms the pre-filter signal with sufficient confidence. Features: dual Standard Broker / Prop Firm risk modes, configurable lot sizing, optional martingale, multiple SL/TP modes, trailing stop, partial close, news/time/day/spread filters, draggable on-chart info panel, and fully exposed indicator parameters. Requires MetaTrader 5, WebRequest enabled for your provider's URL, and a valid API key. Provider auto-detected from key format.

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.

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.

1...555657585960616263646566676869...199