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

Submit your code

Simple trend visualizer.

The simplest EA based on the WeightOscillator weighted oscillator.

Derived from the NRTR indicator, provided with a new visual display.

The smoothed Money Flow Index oscillator with the color indication of overbought/oversold level breakouts and of the histogram direction.

Trading system based on the signals of the ICHI_OSC indicator

Volatility Quality Stridsman (histo).

Average True Range (ATR) indicator values from other timeframes in a digital format, displayed as text on the chart.

Many traders are interested in native work with the BTC-e exchange directly from MetaTrader. In the exchange API, it is necessary to send data with the confirmation of parameters validity through HMAC-SHA512. The algorithm of SHA512 and HMAC calculation is implemented in this class.

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

Two histograms in one window, showing the maximum average price deviation in points from the initial value.

The Expert Advisor trades based on iMA and iRSI signals. Values of iMA on four bars are compared. Indices of these bars can be optimized.

Woodies CCI is a momentum indicator that was developed by Ken Woods. It's based on a 14 period Commodity Channel Index (CCI).

This version is a sort of normalized version - since it shows Volume as a percent compared to the Average Volume over a chosen period.

The script draws horizontal lines representing BUY (blue) and SELL (red) orders.

Indicator of volumes accumulated.

Handy functions for comparison, rounding, formatting and debugging of doubles (prices, lots and money).

Panel indicator with the date on closed positions.

Working with pending Buy Limit and Sell Limit orders. Grid of pending orders.

The EA based on iCCI (Commodity Channel Index, CCI) indicator plus managing position volumes using martingale.

Working with pending Buy Stop and Sell Stop orders.

The EA based on iMACD (Moving Average Convergence/Divergence, MACD) and iStochastic (Stochastic Oscillator).

SuperTrend indicator

Step average - standard deviation based

VZO

Indicator VZO

Ergodic TSI (True Strength Index) as described by William Blau

Indicator RSI Overlay

Advance Parabolic Time/Price System

Correlation market state

Strategy based on the standard indicator iCHO (Chaikin Oscillator, CHO) and custom indicator 'CCIDualOnMA'

Custom Hammer and Inverted Hammer

This function performs the main logic of opening a trade. It calculates the opening price, take profit levels and stop loss based on the symbol information and parameters provided by the user. Prepare a trade request (MqlTradeRequest) with the necessary information such as symbol, volume, order type, slippage, comment, magic number, etc. Call the OrderSend function to send the trade request and get the result. SetTypeFillingBySymbol function: determines the order fulfilment type (Fill or Cancel, Immediate or Cancel or Return) according to the symbol's fulfilment policy. GetMinTradeLevel function: calculates the minimum trade level based on the freeze level and stop level of the symbol. Adjusts the minimum level to ensure that it is within certain limits and returns the result.

Rsi Ea using RSI signals with ATR volatility-based stops, automatic position sizing, scale-out feature, and trading session filter

A short format for storing ticks.

The Bollinger Bands ® Indicator (BB) is similar to Envelopes. The only difference is that the bands of Envelopes are plotted a fixed distance (%) away from the moving average, while the Bollinger Bands are plotted a certain number of standard deviations away from it.

An indicator lets you specify the number of bars separately before and after the current High / Low (fractal) can.

This indicator fits a trigonometric model to prices and extrapolates it in the future.

The Panel Designed for "Best Graphic Panel in MQL5" Contest. This graphic panel allows to automate manual trading. It has many functions, including the visual construction of trading strategies.

The ZigzagColor_Channel plots a channel by connecting the ZigZag peaks and ZigZag bottoms.

Trade signals based on reversal candlestick patterns is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

Trade signals based on "Morning Star/Evening Star" candlestick pattern, confirmed by Stochastic indicator is considered. The code of the Expert Advisor based on this strategy can be generated automatically using the MQL5 Wizard.

1...252627282930313233343536373839...205