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

Submit your code

BB MACD MetaTrader indicator — is a basic MACD (Moving Average Convergence Divergence) indicator variation, which helps in detecting the trend change points and measuring the current trend's strength. The indicator is drawn in the separate window on the chart and consists of two lines (blue and red) and the dots, which can be either green or magenta. The change of the dots' color is a good signal provider, while the width of gap between the two lines indicates the strength of the current trend. This indicator is available for MT4 and MT5.

Round Levels MetaTrader indicator — an MT4/MT5 indicator that can display round levels and zones near them based on your configuration. It can be useful to trade off the natural psychological support and resistance zones. It can also issue alerts when the price is in either support or resistance zone.

A simple utility for monitoring long and short swaps of a single symbol. If your broker-dealer's swaps are specified in points instead of account currency, this utility automatically converts points into account currency. Swaps are tripled on Wednesday. Horizontal and vertical alignment can be adjusted in the inputs.

Testing on history in the MT5 tester maths mode.

This indicator detects a specific bearish spike formation over 3 candles

A channel which calculates local highs and local lows with volatility-adjusted lines

Automated trend-following EA using EMA, RSI, and Stochastic signals to open trades on the last closed candle with Stop Loss and Take Profit.

Regime-adaptive grid EA with three operating modes (BGT/TGT/MGT), ATR-dynamic spacing, CUSUM change-point detection, equity-based cycle management, and a full CSV diagnostics pipeline. Based on the Bi-Directional Grid Constrained (BGC) stochastic process research by Taranto & Khan (2020–2022).

Asian Range Breakout day-trading EA. Multi-symbol, M15/M30/H1. Places pending stop orders during the London session outside the pre-London Asian range, using PSAR + MACD + Stochastic signals, with automatic London/NY DST handling, structural stops, trailing and break-even.

Expert Advisor for testing the Inside Bar continuation hypothesis. The EA places pending orders in the direction of the Main Bar after a valid Inside Bar pattern is detected, with optional ATR and pattern quality filters.

A simple indicator based on trend criteria

The AK-47 Scalper EA is fully automated. It employs a strategy of continuously entering Sell Stop orders and will modify them when the price moves against the pending orders.

The Multicurrency Expert Advisor.

Opens a virtual hedge position in MetaTrader 5.

The Pivot levels indicator, the Pivot sublevels and the Camarilla levels drawing the indicator buffers and the horizontal lines

Volatility channel is a very interesting alternative to Bollinger Bands.

The oscillator that displays strengths of Buyers (Bulls) and Sellers (Bears) separately.

The script demonstrates the example of using the FileTell() function

The indicator shows inverted chart for better short trading.

Another zigzag version with a simple code that correctly determines peaks.

A Moving Average that includes price series processing by Gaussian filter.

Flight smiles.

The robot opens two positions, profits of which overlap each other, and waits for a profit.

Converts .set files from MT5 format to MT4 format.

The Expert Advisor checks the direction in which the price has been moving for the last 10 seconds, and opens a position in accordance with the movement. The EA sets Stop Loss and Take Profit.

Volume Wave indicator originally idealized by Richard D. Wyckoff.

BB stops of MACD with multiple stops

I want to share with you this story. When I started trading, I learnt the scalping strategy in a volatile market. I really loved scalping especially when I see the price is moving fast. However, scalping for a long period of time is exhausting to me especially in a volatile market; volatile market requires fast analysis, actions and reactions; that is why I always reach a point that I loss concentration, focus and I start making those really stupid mistakes. That is why I created this indicator that helped me to automatically identify these potential entries (based on the formation of candlesticks) instead of doing all the work myself. I know there are plenty of Metatraders who also suffer from this and that is why I would like to share this indicator with you, hopefully it will be beneficial. Do not forget to send you comments as well as rate these scripts. Happy trading!

ATR Stop Loss indicator

The iUSDx indicator uses the "MCM Control Panel" for multicurrency mode. It calculates the USD index.

The indicator generates market entry signals based on the ADX indicator.

Stochastic RSI is a standard Stochastic oscillator, the values of which are calculated not from a price series but from RSI technical indicator values.

CVHFOnArray class is designed for calculation of Vertical Horizontal Filter (VHF) values on indicator buffers.

The CPriceChannelOnArray class is intended for calculation of the price channel on indicator buffers.

The chart of (three) linear breakthrough in a separate subwindow

The Expert Advisor with which Alexander Prishchenko (Crucian) participated in Automated Trading Championship 2012

Smoother Relative Strength Index.

The semaphore signal indicator fixing moments of breakthrough of the zero level by the iCCI technical indicator and displaying these moments by color points

The script demonstrates the example of using the FileGetInteger() function

The RoundLevels indicator draws two closest "round" levels above the current price and two more below it

1...120121122123124125126127128129130131132133134...205