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

Submit your code

Trend Trigger Factor indicator with T3 smoothing (to lessen false signals) and some extras in order to make the trend triggering state easier.

This indicator is actually a combination of two values: it shows the crosses of fast and slow Zero Lag TEMA, and that cross determines the current market trend.

The Center of Gravity Channel indicator

CCI_Histogram_Vol indicator with additional averaging of the resulting histogram

Average from MA indicator

Expert Advisor based on iRSI (RSI) and iMA (Moving Average, MA).

Position volume calculation based on trading history. The Expert Advisor applies iCCI (Commodity Channel Index) and iMA (Moving Average) indicators. Trailing is present as well.

Stochastic volatility - on chart

Indicator Fractal Channel

SAR Oscillator 2 indicator

The Fib_SR indicator with two additional support and resistance zones.

Two identical trading systems (for long and short deals) based on the ColorMaRsi-Trigger indicator signals that can be configured in different ways within a single EA with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system.

Indicator of Murrey levels in indicator buffers with the added visual text information on those levels, calculating the levels on a timeframe specified in the inputs

A price channel based on a bar of user-defined duration (timeframe).

BB stops - Hull average based with multiple stops included

TRIX (using fast EMA for calculation)

Compute the daylight saving time changes (start/end of the summer time).

Converts trendlines into horizontal lines.

DCC / Piercing

Multisymbol OnTick.

This code block loops through all opened position and do trailing based on Ask and Bid prices.

QuickTradeKeys 123 is a user-friendly Expert Advisor (EA) for MetaTrader 5, enabling traders to execute buy and sell operations quickly by simply pressing the numbers '1' and '2' on their keyboard. Pressing '3' closes all open positions. This EA is ideal for swift trading and testing purposes where manual intervention is required without using the mouse.

MovingAverages.mqh Part I A multi timeframe version is available with colors for orientation, for developers or profitable traders for free. Offer under conditions. Other multi timeframe indicators are also available.

A script which when run displays the maximum lot size permitted on the asset.

Candle Wicks Length Display MetaTrader indicator is an indicator that can display the length of candle wicks in pips directly on your chart. You can set the minimum length to be displayed. Alternatively, it can show wick lengths that are less than the given limit. The indicator supports all sorts of alerts and works with both MT4 and MT5.

A script which when dragged onto the chart will print out in the experts window the number of bars that are on that chart - like magic.

This indicator reads the trade history and plots the Cumulative P & L over time, helping visual traders to see how much money they are making or losing over time. This current version has a difference of 0.02% marginal error, due to rounding floats, and calculation methods. It can be considered extremely precise with this marginal error.

A stripped-down (signal line only) version of Metaquotes' MACD indicator from the MT5==>Indicators==>Examples folder.

This indicator calculates and displays the Exponential Moving Average (EMA) on the MetaTrader 5 chart. Fully customisable period. Allows selection of the applied price (Close, Open, High, Low, Median, Typical, Weighted). Uses the standard EMA formula, initialised from an SMA of the first bars. Can be used as a standalone technical analysis tool or integrated into automated trading systems for trend-following and moving average crossover strategies.

This is a simple price channel indicator allowing user to customize period and line colours. Often used in channel break strategies.

A robust Market Structure analyzer that adapts to volatility. ASZ uses a Hybrid ATR engine to filter noise and detect reliable Swing points. Non-repainting on confirmed bars.

Calculates fractals and lets you specify the number of bars separately before and after the current High / Low (fractal).

The "Support and Resistance" indicator shows the support and resistance levels using the Fractals indicator by Bill Williams.

This trend indicator shows the current trend direction and moments for closing of the opened position.

CADXOnArray class is designed for calculation of ADX (Average Directional Movement Index) values on indicator buffers. The example of use of the class is provided.

Trinity-Impulse indicator shows market entries and periods of flat.

The indicator shows entry signals based on Accelerator Oscillator.

The indicator draws (in a separate window) the Bollinger Bands relative to the moving average and projection of the price bars.

This Indicator is used for calculating trend.

1...383940414243444546474849505152...195