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

MQL4 Source Code Library for MetaTrader 4 - 31

The largest library features codes of free trading Expert Advisors, technical indicators and scripts. With the available applications you can trade in automated mode and analyze price dynamics. Use the library of codes to learn more about financial market sentiments.

Download free applications, test them and run in your MetaTrader 4. You can access them from the MetaTrader 4 platform and the MetaEditor development environment.

latest|best

This scrip will close all your open positions in your MT4. You just need to drag it to the chart.

This EA will watch your open positions and close the ones that meet the preset conditions.

Yet another pivot points indicator, light and customisable.

This indicator, recognizing trends in an early stage, can be used to get ready for a break-out scenario.

Indicator that shows you market push and future 80% of next big trend.

Detects fake, old, stale, or other erroneous ticks that come to the MT4 platform. These rogue ticks can sometimes cause a take profit, stop loss, trigger orders and/or any price-related action to occur when the price is actually no longer actionable.

This indicator shows simple Support and Registance lines.

The Great Hunter, is a Holy Grail attempt, by using a mix of trend following indicators, volatility filters and martingale system (optional).

This EA puts two simultaneously Pending Orders (Buy Stop and Sell Stop), when activated one of two pending orders, the reverse pending order is closed.

This script can close all your pending orders in your MT4, or you can select different pending orders.

An EA meant as advanced Order-Placement tool, which tries to help its user to set the "Stop-Loss"-level farther away with the same or less losses than normally expected.

X trader trades using two moving average crosses.

It trades huge amount of trades with small lot sizes. Does not use indicators or price formations, buys/sells in growth/fall of price.

AntiFragile EA is an innovative trading strategy built on the idea of Antifragility professed by Nassim Nicholas Taleb. The general idea is to gain from disorder.

This Expert Advisor trades Parabolic Sar (PSAR) trend changes and applies a fast exit strategy. The parabolic SAR is a technical indicator developed by J. Wells Wilder. Basically, if the stock is trading below the parabolic SAR you should sell. If the sto

The Stretch is a Toby Crabel price pattern which represents the minimum average price movement/deviation from the open price during a period of time, and is used to calculate two breakout levels for every single trading day.

You can either be long or short at any given time. You buy and close a short position if the market makes a new 100-day high, and sell and close a long position if the market makes a new 100-day low.

Based on ibull/ibear, but compare power to define good entry bars.

Kijun Sen and Envelope.

Any symbol Bid, LastDayDiff(% or pip), Spread, Swap, Hi-Lo Today, Hi-Lo Week, Hi-Lo Mounth view to separate window.

Buy only using High Previous candle Breakout H4 timeframe

This script can close all your open positions in your MetaTrader 4, or you can select different similar positions.

Writes Account Balance, Equity, Margin, to a .csv file in regular intervals, and alerts via email when certain Margins levels are reached

Trendsignal indicator with potential area drawn on chart.

The indicator finds and draws linear channels using all timeframes from M1 minute to MN.

Limited distance between the upper and lower donchian line.

Indicator to save screen shots of your charts at regular intervals, based off the timeframe of a chart. Great for analyzing combinations of indicators, Price Action, and multiple timeframes.

Any symbol Swap, Spread, Hi-Lo Today, Hi-Lo Week, Hi-Lo Mounth view to separate window.

Aeron Expert Advisor is well known. I am the author of Aeron Expert Advosor. It is based on martingale pattern and all of its parameters are fully customisable.

Ichimoku with Moving Average instead middle Price channel (Donchian channel) .

Export text to Excel in real time using native DDE library provided by Windows

Uses up to 4 visual "sliders" in the chart window to quickly and easily adjust values of any technical indicator in a separate window. Based on MetaTrader 4 chart objects, not DLLs.

Different view of the figures and the patterns of the day ....

Writes days of week above candles.

Moving average on the basis of individual price

This set of scripts has been designed to scale-in your trades as price action runs in your favor. This will maximize profits due to proper pyramiding, decrease the impact of unprofitable trading decisions and in general, make your life easier.

Indicator displays information about the current positions

This is a new implementation of the SuperTrend indicator for MetaTrader 4. The SuperTrend indicator is an application of the concept of MAE (maximum adverse excursion), which was introduced by John Sweeney in the mid-nineties.

Expert Advisor opens deals based on price consolidations

The Expert Advisor places buy trades when RSI crosses above 73 and sells when it drops below 27. A trailing stop based on ATR protects profits.

1...242526272829303132333435363738...84