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

Top MQL4 and MQL5 source codes based on user ratings - 13

Submit your code

"How much is a 1 pip movement on EURUSD (or any pair) worth in my currency?" - here's the answer!

MQL4 library that allows authenticating into a MetaTrader 4 account programmatically in release 880+.

Here I propose a simple password verification scheme which uses MT4's built-in security engine providing DES/ECB encryption and does not require code re-compilation for each new customer.

Building a moving line by a polynomial of the 4th degree. Extrapolate a sine curve and its axis. One value on each bar is removed from the drawn lines and a sliding line of extrapolated values is drawn, which is not redrawn.

One of the latest version of this indicator at the moment. Huge base of different modifications of moving averages, with multitimesframe function, sending signals to e-mail and push notifications.

With the help of this library it is possible to implement the ability to maintain positions with a simple trailing stop in any Expert Advisor.

YURAZ's library, determining the switch to dayllight saving time and revert to standard time

The Moving Average Indicator shows the mean instrument price value for a certain period of time.

Ichimoku Kinko Hyo indicator is predefined to characterize the market trend, Support and Resistance Levels, and to generate signals of buying and selling.

Use this script to make own nonstandard timeframes.

The script outputs the information on symbols to a CSV file: swaps, spreads, stops, contracts.

A set of scripts that are intended for the automation of some routine operations in the terminal.

Indicator Vegas.

The indicator searches for the patterns, displays the end of the D and C points on the screen.

An example of automatic running of the script when the timeframe or symbol is changed.

The indicators that can display several larger timeframes, japanese candlesticks and Fibo levels on a single chart.

The indicator is similar to 4Hour Vegas Model.

Drag & Drop the script at chart on point where StopLoss should stay. Script will compare desired StopLoss with the current price and determine the type of the order - Buy or Sell. The next step is calculating the volume according Free Margin and the Risk

Display Candles from a higher timeframe on top of your current chart (ex: see H1 candles on top of a M5 line chart)

Script closes all opened and pending positions.

Ichimoku indicator based on RSI values that displays in your sub-window.

This indicator compares four types of regression (linear, quadratic, logarithmic and exponential) and chooses the one that best fits the data analyzed.

This indicator will display a symbol watermark on the chart background, showing the timeframe and symbol name in large font.

This is the standard MACD indicator drawing two flat lines instead of a signal line. It allows you to detect and trade flat markets.

This is an updated version of b Clock.

This indicator is a modification of classical Awesome indicator. It computes the smoothed rate of change of two exponential means.

All open trades must be of same symbol and type, e.g. all GBPUSD and all BUY. This script will close out your position using one large trade to hedge your position then using CloseBy() function to close all trades against the one large trade until all trades are closed. There can be a maximum of 500 open trades.

When we want to know how many times price will goes up and down 40 pips before breaking this channel, we will need Bounce Number tool.

Virtual SL TP Pending with SL Trailing for Symbol Chart

Center of Gravity is an oscillator developed by John F. Ehlers and presented in his article in Stocks & Commodities magazine (May 2002).

This script will plot Fibonacci golden spiral on the chart.

In classical literature, the relative strength index is described as the "price-following oscillator that ranges between 0 and 100, and signals the market sentiment to change the trend at high (close to 100%) or low (close to 0%)...

The Price Channel indicator calculates the highest high and lowest low of the trailing number of bars specified by the input Length.

Another version of popular ZigZag.

An indicator by the Natuseko Protrader 4H Strategy

It's an instrument for spread monitoring for a real and synthetic currency pairs.

A brand-new version of Channel ZZ indicator

Many developers face the same problem - how to get to the trading terminal sandbox without using unsafe DLLs. One of the easiest and safest method is to use standard Named Pipes that work as normal file operations.

Support and Resistance levels using the psar logic.

This indicator adds H3, H6, H8 and H12 time frames into your charts.

1...67891011121314151617181920...104