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

Submit your code

The script calculates the maximum lot size that can be used to open a position using the entire free margin available on the deposit.

Advisor on the signals of the indicators Bollinger Bands and Moving Average.

An indicator of ticks (Bid and Ask). Displays the last 300 ticks.

The Expert Advisor searches for N identical candlesticks in a row. It buys on bullish candlesticks and sells on bearish ones. The account type is taken into account, i.e. whether it is netting or hedging.

The script saves current chart settings to a template with the specified name.

Laguerre stripped of RSI "experiment".

The Triple Exponential Average (TRIX) indicator + the signal line + arrows at the intersection of the signal and the main lines.

The Expert Advisor is based on Bill Williams' strategy.

MetaTrader 5 allows creating synthetic instruments. The price of such instruments can depend on the current values of a number of financial instruments. In trading, such symbols allow spotting the beginning and end of global market movements at an early stage. In this example we create synthetic instruments to analyze the strength of Forex currencies EUR, USD, GBP, JPY and CHF.

ADXVMA uses modified ADX calculation for adapting Moving Average calculation.

The indicator measures money on a chart.

The Gold Dust

Trend trigger factor (averages pre-filtered)

Displaying the latest closed values of indicator Bollinger Bands® with colored rectangles and background filling

Adaptive moving average - double smoothed

ATR

Average true range

Variance (Welford’s method for computing)

Margin Calculator, Point Value Calculator, Position Size Calculator, Profit Calculator and Swap Calculator.

The script provides a synchronous scrolling for all charts opened in the client terminal.

The indicator plots a price channel using the Hodrick-Prescott Filter.

bts

Comparing the speed of a binary or a ternary search

A script to place straddle orders around current price level to catch price spikes around announcements.

This technical indicator detects constant price zones and draws resistance and support lines.

Trades on PERIOD_M1 (M1). Calculates bullish and bearish candlesticks.

Crossover of three iMAs (Moving Average, MA). Alert, sound notification and email notification of the first crossover. Arrows mark the crossover.

Correlation of two symbols.

I used to suffer from unnecessary losses and/or cutting my profit short since I wasn't fast enough to modify my SL and/or TP. That is why I've wrote these scripts that will allow me to react fast when I must modify my Sl and/or TP especially when I have many open and/or pending trades. I know there are plenty of Metatraders who also suffer from this and that is why I would like to share these scripts with you, hopefully it will be beneficial. Do not forget to send you comments as well as rate these scripts. Happy trading!

The AK-47 Scalper EA is fully automated. It employs a strategy of continuously entering Sell Stop orders and will modify them when the price moves against the pending orders.

Classic Pivot Point indicator paints pivot point and three resistance and support levels for all data points.

The semaphore arrow indicator of trend change

The script is assigned to a hot key for quick change of charts around in a circle.

Trader's simple assistant. The MQL5 Spread indicator shows the current spread of the currency pair on a chart.

Classic strategy based on Parabolic SAR indicator. With Auto Lot options and Trailing Stop. This expert advisor is designed with visual strategy builder - Mission Automate. Code is generated automatically. More info: https://www.mql5.com/en/articles/4951

Bill Williams's Awesome Oscillator Indicator (AO) is a 34-period simple moving average, plotted through the middle points of the bars (H+L)/2, which is subtracted from the 5-period simple moving average, built across the central points of the bars (H+L)/2. It shows us quite clearly what’s happening to the market driving force at the present moment.

Color Parabolic 2. The color depends on the acceleration factor.

Something for those who wants to try out new Strategy Tester and don't have any EA.

It searches for tops or bottoms of price movement.

An Expert Advisor for trading during the night.

It plots the bar-averaged price charts (median price).

The oscillator, based on Ichimoku indicator.

1...828384858687888990919293949596...185