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

Submit your code

Byte-wise operation with structures and standard data types.

The Kijun-sen line with color customization and sending alert on trend changes

ZigZag based on RSI oscillator.

This is a trend-following indicator using the moving average and its smoothing. It features alerts, emails and push notifications.

Added the filled array for overbought and oversold zones.

Indicator in the form of a panel. Displays the resulting direction of the position: resulting lot size and up or down arrow.

Works based on the iMACD (MACD) indicators

Maksigen channels - extended version.

The Expert Advisor plays sound alerts when candlestick size exceeds a certain value.

The Expert Advisor synchronizes the local computer time in the interval from 9:50 to 9:59 (before the beginning of the morning session) with the MetaTrader 5 FORTS server time.

Crossing of the two iMAs. Lot calculation based on the risk value as a percentage of margin.

Averaging of values (RSI) using MovingAverages.mqh. Two MA indicators.

The trading system is based on iMACD (Moving Average Convergence/Divergence, MACD) and iStochastic (Stochastic Oscillator)

Information about profit, points, percent, spread and time remaining until the close the bar on the current currency pair and timeframe in a compact and convenient form.

Increased accuracy of the standard timer.

Trend-following trading system Exp_AbsolutelyNoLagLwma_X2 based on the signals of two indicators AbsolutelyNoLagLwma

Historical Volatility bands constructed using average as the middle line, and upper and lower bands using the Historical Volatility high/low (instead of "regular" Historical Volatility) for bands calculation.

Indicator CaudateXPeriodCandle in the main chart, highlighting with colored points caudate candlesticks of the "Hammer" and "Reversed Hammer" types only.

Virtual Trailing Stop.

Candle amplitude indicator

Compared to the Volume Zone Oscillator indicator, this version is additionally using floating levels to determine the trend.

The Dinapoli Preferred Stochastic indicator uses the smoothing method described by Joe DiNapoli, which differs from the standard stochastic.

Stop loss and take profit initial setting. Trailing.

Elder Impulse System indicator

An Expert Advisor based on iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD). Averaging positions, in case of a loss. Improvement of the version 1.0

The strategy is based on two indicators calculated on two timeframes: iAO (Awesome Oscillator, AO) on the D1 TF and iStochastic (Stochastic Oscillator, Stoh) on H1.

This indicator enhance the functionality of the standard crosshair of MetaTrader adding the difference in Percentage and the time span in a human readable form (not in bars, but in Hours, minutes, days, etc)

Separate the construction of a complex object from its representation so that the same construction process can create different representations.

The first really 3D indicator "Moving Average".

Create objects by copying a prototype

Smooth Algorithms - Corrected/Modified

to display trade history files(.csv) on charts.

Beginner tutorial on CCI to learn to code in MQL5

3 Ema moving averages identify trend change with rsi confirm

Perfect Seconds chart indicator allows you to convert minute candles of live data into seconds. 1. Choose any number of seconds to close a bar with accurate time. 2. This is Live OHLC rates based data, It works even if ticks are not available. 3. No external DLL required, it works smoothly on VPS 4. Fast and optimized code 5. Supports Crypto Pairs such as BInance, Kucoin and all other exchanges where Futures live chart can be converted into seconds easily. 6. Support all type of symbols such as Gold and Forex pairs. 7. Options to delete symbol and rates.

The CGV class simplifies the work with global variables of MetaTrader 5 client terminal.

It's an oscillator of the overbought/oversold market conditions. It can also be used as the Momentum indicator. Triple smoothing is used for removing the cyclic components in price movements with the period less than that of TRIX.

This indicator uses the Nearest Neighbor clustering technique, also called k-NN, to search for the most similar pattern in history and use its past prices as predictions of the current pattern future prices.

The spread_on_chart indicator shows the current values of spread, stop and freeze levels.

Trade signals based on "Bullish Harami/Bearish Harami" 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.

1...303132333435363738394041424344...195