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

Submit your code

The MetaTrader 4/5 library allows generating reports based on the trading history.

An example of a template for developing automated trading systems.

This calculates Optimal f using the Geometric Mean. Per Ralph Vince, "In trading we can count on our wins being for varying amounts and our losses being for varying amounts. Therefore the Kelly formulas could not give us the correct optimal f." So, using his equation(s), I created this library for the Geometric Mean version of Optimal f.

The indicator sets indexes for candlesticks in the price movement direction.

Two identical trading systems based on the crossover of the CMO indicator and the zero line, for long and short trades, which can be configured in different ways in one Expert Advisor.

An Expert Advisor based on the "Arrows&Curves" indicator.

The indicator searches for divergences and displays them on the chart of the custom CCI indicator.

Smoothed Positive Volume Index

Four different CCIs combined into a "candles" display of CCI. For smoothing you can use one of the 4 basic types of averages: SMA, EMA, SMMA or LWMA.

NEF

Indicator Nonlinear Ehlers Filter

DBB

Indicator Distance from Bollinger Bands.

An Expert Advisor based on iFractals (Fractals) and on custom indicator ExVol.

Oscillator Adaptable_CCI. Along with the calculation price and period, this indicator, unlike the standard one, allows you to change parameters, such as calculation range, correction coefficient, and smoothing method.

VC

Indicator VC (Volatility Channel by Larry Williams).

SuperTrend Dot indicator

Channel balance indicator

FX Trend trend-following indicator

Multi JMA Slopes indicator checks slopes of 5 (different period) Jurik Moving Averages (JMA) and adds them up to show overall trend.

The Mirror MA indicator features two mirrored moving averages in a separate chart window calculated based on a difference between two MAs with different calculation data, and one signal line calculated based on a direct moving average data.

Choppy market index - smoothed

Corrected JMA

MACD Flat Trend indicator

DSL synthetic super smoother momentum

Bollinger Bands Outside Candle Alert indicator

Double smoothed stochastic

Rsi of average (rsioma) on chart version

Self Advance Decline line - with floating levels

The script exports summary of closed trades grouped by each trading day to .csv file

Correlation phasor

A basic container for storing an ordered list of objects.

This is one of the important thing to consider in order to improve our strategy by calculating on average how much an asset moves, in which it will allow us to identify the best days to trade when the market moves the most as well as the worst days to trade in order to prevent trading during these days.

Envelopes beginner tutorial to learn how to code in MQL5

A zigzag based on the trend change of the parabolic sar

The Williams' A/D indicator is the accumulated sum of positive "accumulational" and negative "distributional" price movements. Divergences between the indicator and the price are a signals.

The indicator determines the bulls or bears prevail on the market and plots their strength.

When the chart symbol is changed, it will change symbols for all other charts.

Aroon Oscillator predicts price changes from trend to flat market conditions.

BrainTrend1Sig is an indicator for positions opening and closing. It indicates trend reversal points when a price reaches extreme values.

CStochasticOnArray class is designed for calculation of Stochastic indicator values on indicator buffers. The example of use of the class is provided.

HLR

The HighestLowestRange (HLR) determines the relative price position in range of the several X bars ago. If price located at range bottom (new low), the indicator is equal to 0, if price position at the top of the range (new high), the indicator is equal to 1 (or 100%).

1...383940414243444546474849505152...210