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

Submit your code

An (optional) include file to enhance error code handling experience.

Rates Version of a script https://www.mql5.com/en/code/30791

Standard MA + Hull MA + DEMA + TEMA

The 8 effective steps to build a robust day trading plan using Fibonacci retracement

Limit channels - with states

Just a very simple expert that execute orders from a text file.

Simple EA on 'iVIDyA' indicator

Detecting the start of a new bar or candle, in the OnTick() event handler of an expert advisor.

SmoothStep (generalized)

Two indicator series ('Two MA Color N Bars' and 'Square') in one code

The Predictive Moving Average was created by John Ehlers (“Rocket Science For Traders”, pg.212″).

An automated trading system with a data panel in form of the OBJ_LABEL objects.

The indicator shows signals ('Arrow' objects) of the 'Moving Average' indicator crossings. The peculiarity of the indicator: if there was an intersection of 'MAs' (on bar #0), and then the intersection disappeared, the signal remains on the chart

iCCI (Commodity Channel Index, CCI) indicator as a colored line

The ZigZagExtremaOnArray is an mqh include file which contains the calculation function of MetaQuotes' Examples ZigZag, BUT you can use it on any buffer that contains curves or histograms, similarly to the MovingAverages.mqh from include. The idea was to get highs and lows of an indicator curve quickly with the help of an "onBuffer" function.

Allows you to determine the occurrence of a new bar event in a multicurrency Expert Advisor

Elegant oscillator

Indicator based on iAO (signal 'saucer') and filter based on iMA

Added alerts to custom indicator

CCI (mimic)

ZigZag Color Indicator for Line Charts which works on Close prices rather than High low This indicator has only one input parameter which is ExtDepth and its optimized for performance

Strategy based on the 'DeMarker' indicator, working with pending orders

Two 'Main' lines from two iStochastic (Stochastic Oscillator, STO) indicators with filled areas between the lines. Line crossing notifications (Sound, Alert, mail, push)

Building good trading habits by seeing things in terms of percentage not in terms of money.

ATR based limit channels

Strategy based on the custom indicator 'RSI_MAonRSI_Filling'. The minimum step is set between positions

In a given time interval, a rectangle is constructed.

Finalization of previous version. Now, when opening a 'SELL' position, we immediately close all 'BUY' positions and vice versa: when opening a 'BUY' position, we immediately close all 'SELL' positions

The simple trading panel is a trading tool that is very interesting because it will allow you to predefine your StopLoss and your TakeProfit in term of pips.

Checks if Metatrader5 Terminal is connected to Internet or not. The expert will Print a message for the connectivity status

'Momentum' indicator and 'Momentum' indicator smoothed with 'Moving Average

Get notifications when hit price level

Open Pending order After Position Get StopLoss

Rex indicator extended version

A simple trading system using the custom indicator "WPR Custom Cloud"

"The Fisher Stochastic Center Of Gravity" was created by John Ehlers (УCybernetic Analysis For Stocks And FuturesФ , pg.95)

This code use detect economic calendar and put pending order before released news time

Modify to allow direct specification of the starting point of the Parabolic SAR.

ADXm (experiment)

Trading strategy based on the custom indicator 'MA on Momentum'

1...173174175176177178179180181182183