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

Submit your code

Trend Envelopes indicator made as histogram.

BB Stops using RSI for stops calculation.

The trading system based on Rj_SlidingRangeRj_Digit_System indicator signals with the possibility to set a fixed position holding time.

The trading system based on DEMA_Range_Channel indicator signals with the possibility to set a fixed position holding time.

The trading system based on the Wajdyss_Ichimoku_Candle indicator signals with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system.

WMA

The Wilder's Smoothing Average (WMA) indicator.

The Delta Oscillator indicator displays the difference in the Delta indicator lines as a histogram.

Step VHF adaptive VMA

This is a utility for beginning indicator programmers, or others, that want to have a look at values provided by OnCalculate and a few other functions. The indicator shows: 1) The most recent value provided with the most recent OnCalculate call. 2) The previous value from the previous OnCalculate call. 3) The first value from the first time onCalculate executed.

Smoothed Williams percent range

Trend indicator similar to Ichimoku Kinko Hyo, with a number of drawing options and calculation parameters.

Multi buylimit and buystop orders are script files that enable traders to place multiple orders with ease. With just one command, traders can place multiple buylimit or buystop orders using either a target price or pips. By default, the pips value is set to 400, which means the trade will be placed 400 pips away from the current market price for a 5-digit broker. This setup includes stop-loss and take-profit levels, which can be adjusted based on the trader's preferences. Notably, these orders come with a level of flexibility that enables traders to fine-tune their trading strategies. For instance, a trader can opt to set the stop-loss level to zero if they do not use stop-loss.

Fractals - adjustable period and prices for MT5

Six bulls or six bear continuous candles

A wick engulf candlestick pattern

Sec-WebSocket-Key Generator

Counter attack candlestick pattern

Here is a simple example that shows how to download page(file) from Internet using the library wininet.dll.

This class provides methods for working with Windows *.ini files.

The library contains the following hash functions: adler32, CRC-32, MaHash8v64. Also it has functions for radix conversion of a number.

The script contains a class, that can be used to solve mathematical and logical expressions, defined as string.

Trade signals based on "Hammer/Hanging Man" 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.

Fast Trend Line Momentum (FTLM) and Slow Trend Line Momentum SLTM) indicators show the rate of price change.

The indicator transfers the price data to the new coordinates system associated with X2MA indicator values.

The candlesticks are colored in red, green and blue colors depending on a trend direction (Moving Average and MACD overall values).

The indicator building Stop Loss levels lines according to BrainTrend1 trading system data with preliminary price timeseries smoothing.

The indicator displays the charts of two symbols in one window.

Fast Trading Panel - the panel for fast trading

This indicator is the conversion of famous Igorad's indicator namely PriceChannel_Signal_v1 with re-enter feature.

The indicator changes the color of the bar to the color corresponding to the current trend, which is determined using the RVI indicator.

The indicator calculates % of growth or drop towards CLOSE. It is written via use of object-oriented programming and can be easily integrated into any Expert Advisor or other indicator.

Class for exchanging data between programs. It allows to pass structures of arbitrary size via the global variables of the terminal from one program to another.

The script shows the trade volume in lots required to move the position to a desired level.

Displays the number of decimal places (the number of digits in the fractional part), time and values of graphic object anchor points.

The Expert Advisor works both in normal mode with one positions, and in the HEDGE mode with multiple positions.

The Exp_PFE_Extr breakout trading system based on the signals of the PFE oscillator.

The Range Action Verification Index indicator implemented as a histogram of strength and direction of the current trend.

The Expert Advisor plots a Fibonacci based on the standard ZigZag indicator and traded rectracements from all levels. The levels are fixed and cannot be customized by the user.

Semaphore signal indicator based on the code of the RVIDiff indicator.

The vaMA indicator with the ability to replace averaging. It displays the most recent value as a price label with the possibility to round the channel levels up to a required number of digits. Additionally, it indicates the trend strength by colored dots based on the standard deviation algorithm.

1...121314151617181920212223242526...191