Watch how to download trading robots for free
Find us on Twitter!
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 - 82

Submit your code

The Keltner channel with customizable calculation parameters.

A moving average drawn as candlesticks on a chart.

Instead of using Simple Moving Average it uses EMA (Exponential Moving Average), and instead of using mean deviation it uses EMA deviation (originally published here EMA Deviation).

Quadratic Regression MA is a sort of a linear regression value variation, but faster in response to market changes.

The Expert Advisor places four positions with different Take Profit levels per time. As soon as one Take Profit triggers, the other positions will be moved to breakeven.

This version of the Accumulative Swing Index indicator is attempting to add some more functionality to it by producing much smoother results.

An indicator for constructing Renko bars in the chart sub-window.

The indicator implements a breakout system using the XHullTrend_Digit indicator cloud

CCI JMA based

The JMACandleTrend_HTF_Signal indicator shows the trend direction or a signal for performing a trade generated by the Skyscraper_Fix indicator at the chosen bar as a graphic object with colored indication of the trend or the trade direction, generates alerts or sound notifications if there are signals for performing trades or sends push notifications to a smartphone

BB stops JMA - multiple stops

DSL Chande momentum oscillator - smoothed

Indicator Volatility Quality Index

A channel is a trading range between support and resistance levels that a stock price oscillates in for a period of time. This indicator draws the resistance and support lines based on the peaks and valleys that are found within a defined period of time.

Indicator Double-deviation Bollinger Band with cloud

Smoothed WPR with floating levels and on chart support / resistance levels

Donchian channel - extended, multi time frame version

ATR

Average true range

Range BreakOut EA. The range is defined by the min number of bars and max width in pips. This expert advisor is designed with visual strategy builder - Mission Automate. Code is generated automatically. More info: https://www.mql5.com/en/articles/4951

Monster Trend indicator that uses data from several time periods.

This script allows a user to find out instance_id of the running MetaTrader instance/installation.

This is MQL5 project packer: assemble all source and resource files from dependencies into a single ZIP.

Weighted deviation bands

I wanted to build a moving average which would create an alert when the price moves over the line by a user defined amount of points. It creates both bullish and bearish signals depending on the direction of market price moving through the MA. It is designed for slow length moving averages (default is 200-day MA). EDIT: I now added a second version of the indicator which uses Arrow buffers instead of ObjectCreate.

Click on candlestick to see its body range, high low range, upper wick range and lower wick range value.

This indicator calculate count of one direction movement in selected period.

A simple signal indicator based on RSI and Moving Average. Plots Buy/Sell arrows when RSI is above/below 50 and Price is above/below the MA.

Overview Grid Master EA is an automated trading system that implements a bidirectional grid strategy. It places multiple pending orders above and below the current market price, capturing profits from market oscillations in both directions.

The script illustrates control of chart properties using the classes from the Standard Library (CChart).

Using Perceptron, Automatic Learning

Trade signals based on "Bullish Engulfing/Bearish Engulfing" candlestick pattern, confirmed by Relative Strength Index (RSI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Symmetrical normalized CCI (Commodity Channel Index) with alternative (ultralinear and JMA) smoothing algorithms.

Stalin is one of the so-called «signal» indicators, as it provides a trader with accurate market entry points.

Superposition of RSI and DeMarker technical indicators.

Detrended Price Oscillator (DPO) shows the market overbought/oversold states and also can be used for getting buy/sell signals.

Two-pole super smoother filter from John Ehlers' book "Cybernetic Analysis for Stocks and Futures: Cutting-Edge DSP Technology to Improve Your Trading" is used in this indicator for moving average calculation.

The trend indicator made as NRTR (Nick Rypock Trailing Reverse).

The trend indicator that gives signals for performing deals. The indicator color depends on the market movement direction determined by the indicator position relative to the zero line.

The indicator calculates forecast prices of the daily price range. It shows resistance and support levels of current day using the prices of the previous day.

Modified CCIT3 indicator

1...757677787980818283848586878889...194