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

Submit your code

A simple trend indicator of the oscillator type.

The NRTR_ZigZag indicator with price labels of the ZigZag peak values.

The smoothed Commodity Channel Index oscillator with the color indication of overbought/oversold level breakouts and of the histogram direction

The TTM-Trend indicator with the timeframe selection option available in the input parameters.

Detrended Synthetic Price with histogram.

The Expert Advisor trades inside a channel, reversing positions at the channel borders.

A semi-automated Expert Advisor which signals of breakouts of specified horizontal levels.

The Expert Advisor calculates the maximum lot size that can be used to open a position using the entire free margin available on the deposit.

The indicator sets the "Fixed scale" property to a chart window and holds the first bar in the middle of the window.

A trend indicator, which receives trade signals from the XMACD histogram.

The indicator draws the opening price of the day. It works on timeframes up to H1.

This Ulcer Index indicator was derived from the stock risk indicator by Peter Martin in the 1987 book "The Investors Guide to Fidelity Funds".

An indicator of the dominant direction of closing of bars.

Stochastic Price Rate-of-Change Oscillator.

Trend Envelopes variation of RSI indicator.

This version of QQE is using Velocity indicator to determine trend.

Three independent trading systems using BrainTrend_V2, AbsolutelyNoLagLWMA and X2MACandle indicators 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

RSI Divergence indicator

TMS Arrows indicator

XFisher_org_v2_Candle_Alert indicator with background filling for overbought/oversold areas, as well as for the channel between them

Slope Direction Line / Moving Average confirmation candles indicator

Deviation scaled MA - extended

Indicator of Murrey levels in indicator buffers with the added visual text information on those levels

Indicator Multi Timeframe Linear Regression MA with signal line

This is Larray Williams's Variable Accumulation Distribution, used in volume analysis.

Schaff trend cycle - Hull

Double smoothed Wilders EMA

Volatility ratio - standard deviations based

TRiX slope divergence

Perfect Trend Line 2

A set of macros to benchmark small code snippets for their execution speeds.

The EA trades using the Rectangle, EMA and SMA indicators.

MACD beginner tutorial to learn how to code in MQL5

This function performs the main logic of opening a trade. It calculates the opening price, take profit levels and stop loss based on the symbol information and parameters provided by the user. Prepare a trade request (MqlTradeRequest) with the necessary information such as symbol, volume, order type, slippage, comment, magic number, etc. Call the OrderSend function to send the trade request and get the result. SetTypeFillingBySymbol function: determines the order fulfilment type (Fill or Cancel, Immediate or Cancel or Return) according to the symbol's fulfilment policy. GetMinTradeLevel function: calculates the minimum trade level based on the freeze level and stop level of the symbol. Adjusts the minimum level to ensure that it is within certain limits and returns the result.

KA-Gold Bot is an advanced trading advisor specifically designed for gold, utilizing the powerful combination of the Keltner channel strategy and two exponential moving averages (EMAs) - the 10-period EMA and the 200-period EMA. Principle of Operation: The 10-period EMA represents the average price cutting above/below the Keltner band, confirming an uptrend/downtrend. The price being above the 200-period EMA supports the uptrend/downtrend. This indicates that the uptrend/downtrend has been stronger than the previous 10 periods, considering the volatility over the last 50 periods. - Time frame: M15

This is a basic library to create and manage grids.

Butterfly Strategy Expert Advisor This Expert Advisor (EA) implements the Butterfly harmonic trading pattern across multiple timeframes (M2 to D1) for automated forex trading. It detects bullish and bearish Butterfly patterns using pivot points and executes trades with customizable risk management and multiple take-profit levels.

ASI was created by Wales Wilder as an ordinary fluctuations indicator that gets signals from previous maximums and minimums of price.

The Williams’ Percent Range Indicator (%R) is dynamic technical indicator, which determines whether the market is overbought/oversold.

The function allows checking whether a new bar has appeared on the specified timeframe.

1...282930313233343536373839404142...194