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

Submit your code

The WATR_HTF_Signal indicator shows a trend direction or a trade signal generated by the WATR indicator at the chosen bar as a graphical object with colored trend indication or deal direction. It also triggers alerts and plays audio signals.

Detrended Synthetic Price in oscillator form.

The Expert Advisor moves trailing stops of all positions on the current symbol.

The PercentageCrossover indicator with the timeframe selection option available in the indicator input parameters.

The class monitors the emergence of a candlestick

A trading system based on the Omni_Trend indicator signals.

The indicator allows displaying on a chart eight Moving Averages with the same averaging methods and calculation prices, but with different periods.

An indicator based on Elder's "Safe Zone".

An indicator of important extremums.

A trading system based on the KWAN_CCC indicator signals.

TTF

Oscillator TTF (Trend Trigger Factor) was developed as a method to identify market trends and reversals.

Flat/trend indicator.

Indicator True Strength Index

ATRStops_v1 indicator in the candle form

Ehler's Center of Gravity indicator

Trend intensity index

Adaptive Moving Average - AMA - as described by Vitali Apirine

Stochastic on chart

This is a working singleton code example. The sole purpose of this post is to provide a working code sample of a singleton object. A singleton object is created when there 'can be only one' of the object. This is accomplished by making an object's constructor private, and ensuring assignment and copy operations are also private. I was working on an EA and identified that an object should never have more than one copy. I don't expect the EA to ever get large enough for it to actually matter that a singleton is used, but I like the clarity in the code for the object's type. The code follows closely the tutorial at http://www.yolinux.com/TUTORIALS/C++Singleton.html.

This is a tutorial on how to confirm double bottom & RSI patterns

This Indicator creates automatically a Risk/Reward Box on you all opened chart base on High, Low price with the old candles. You can use it easily to drag and change size and price to your desire wanted.

The Demarker Indicator (DeM) is based on the comparison of the period maximum with the previous period maximum. When the indicator falls below 30, the bullish price reversal should be expected. When the indicator rises above 70, the bearish price reversal should be expected.

The Momentum Technical Indicator measures the amount that a security’s price has changed over a given time period.

The indicator helps to find the reversal bar of the trend.

This is the Heiken Ashi indicator, based on the averaged Open, High, Low and Close prices, averaged using the Adaptive Moving Average.

The indicator shows deals history on the chart.

Trade signals based on "3 Black Crows/3 White Soldiers" candlestick pattern, confirmed by Commodity Channel Index (CCI) indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

The DRAW_COLOR_LINE drawing style is used to plot lines with different colors, the colors are specified in the color buffer.

BrainTrend2Sig is an indicator of the market trends that assigns colors to candlesticks according to the trend direction.

RSI indicator applied to MACD clearly shows the current price divergence.

Simple but demonstrative trend indicator.

Relative Vigor Index that allows to select RVI and the signal line smoothing algorithms.

Four-colored histogram of OsMA (Moving Average of Oscillator) allowing to implement different smoothing algorithms.

Mikahekin can be called a complete analytical block rather than just an indicator. The color of bars shows a trend direction and their height indicates a trend power. Blue and magenta dots show trailing-stop levels for long and short positions, respectively.

This indicator shows the simple clock in comment.

The simple script for deleting all graphical objects from a financial asset chart. It can be useful, in case the chart is overcrowded by objects that are not needed anymore.

CADOnArray class is designed for calculation of AD (Accumulation Distribution, A/D) values on indicator buffers. Test_ADOnArray indicator is provided as the example of the class use.

Script for the charts simultaneous scrolling.

The indicator draws a grid of eight stochastic oscillators on one chart with the possibility to change the number of displayed lines.

BykovTrend_HTF_Signal shows a trend direction or a signal for performing a deal generated by BykovTrend indicator as a graphic object with colored trend indication or deal direction.

1...131415161718192021222324252627...185