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

MQL5 Source Code Library for MetaTrader 5 - 61

icon

This is the largest free source code library for MetaTrader 5 platform programs. Here you can find ready-made Expert Advisors, technical indicators, scripts and libraries. Use the code library when learning MQL5 language and develop your own automated trading applications based on the provided codes.

You can freely download and test published codes, as well as launch them in MetaTrader 5. The library is also available directly from MetaTrader 5 platform and MetaEditor development environment.

Submit your code

Working with pending orders Buy Stop and Sell Stop. A channel of two indicators iMA (Moving Average, MA).

Indicator BrainTrend2Stop with the timeframe selection option available in input parameters.

Indicator BrainTrend2 that generates alerts and sends e-mails and Push-messages when the indicator changes its color.

Positions are opened pseudorandomly. In case of loss (closing by Stop Loss and negative profit), Martingale is applied.

The inverted chart of the current financial instrument, displaying Ask and Bid price levels.

Indicator AnchoredMomentum_x10 shows the location of indicator AnchoredMomentum from ten different timeframes.

A trading system based on the signales of indicator ATR_Normalize_Histogram

Indicator ATR_Normalize_Histogram with the timeframe selection option available in input parameters, alerting when the overbought/oversold zones are broken through.

A typical oscillator using Average True Range in form of a multicolor histogram.

A trading system based on indicators MACD and SAR. The signal receiving formula is completely optimizable.

Trading on several candlestick patterns. The levels of Take Profit, Stop Loss, and Trailing are separate for BUY and SELL.

The EA works in the quietest hours (upon closing the American session and before opening the Asian session).

Indicator ASCtrend_NRTR with the timeframe selection option available in input parameters, alerting and sending e-mails and push-messages when the indicator changes its color.

TVI

TVI (Trade Volume Index).

Channel indicator

RTR

Oscillator RTR (Range To Range) shows the ratio of two ATRs, a fast one and a slow one. Indicator RTR (Range To Range)

Indicator ASCtrend with the NRTR line of possible stop order locations.

The indicator of the lowest tops and the highest bottoms.

Direction Filter Indicator.

MIT

Oscillator MIT (Momentum In Time) is a normal momentum with anchoring the calculations to the calculation start time.

Linda's Coil - an indicator of "engulfed" candlesticks.

Glitch_Index - indicator of the price deviation from its average value.

GAPO (Gopalakrishnan Range Index Oscillator) assesses quantitatively the volatility of an instrument, based on the trading range logarithm over an N-day period of time.

Oscillator ERVI (Ehlers' Relative Vigor Index) based on the relative vigor index by John F. Ehlers.

ESM

Indicator ESM (Elsig's Shifting Mean) shows the averaged shift of price over the specified time interval (bars).

Indicator ADL (Advances/Declines Line) shows the ratio of positive and negative price increments over a specified time interval.

A trading system based on the AbsolutelyNoLagLwma indicator signals.

Indicator AnchoredMomentum with the timeframe selection option available in input parameters.

The inverted chart of the current financial instrument.

Indicator ADX_Cross_Hull_Style_NRTR with the timeframe selection option available in input parameters.

Locking positions - opening Buy and Sell simultaneously.

An automated trading system with a data panel in form of the OBJ_LABEL objects.

An NRTR-type indicator using Average Directional Movement Index.

Indicator AbsolutelyNoLagLwma with the timeframe selection option available in input parameters, alerting when the indicator changes its color.

This oscillator shows the differences in points between the successive High of bars/candlesticks and Low of bars/candlesticks. It also shows them in different colors, depending on the directions and amount of points set in the properties.

A moving average using double LWMA-averaging and implemented in color.

Dynamic managing the lot size depending on the balance.

A semaphore signal indicator using the algorithm of indicator 2XMA_Ichimoku_Oscillator.

A trading system based on indicator iBands (Bollinger Bands, BB). Placing pending Buy Stop and Sell Stop within a specified time interval (from XX o'clock to YY o'clock).

A trading system based on the signals of indicator AverageChangeCandle.

1...545556575859606162636465666768...183