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


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.

Submit your code

FMOneEA is a scalping Expert Advisor based on MA and MACD indicators.

Average of ATR (AATR) is simple but effective indicator to confirm any price action trading strategy.


The indicator for the analysis of CFTC reports.

The script creates an ellipse on window drop.

The indicator shows current spread with color line.

Script deletes selected object types from the charts (current chart or all active charts).

When the current price is below trendlines, EA will wait for upward breakout, and vice versa.

BB_OsMA indicator is the OsMA indicator in the form of spheroid with a deviation as the upper and lower bands.

This indicator is a composite of several indicators: Fibonacci, Pivot Point, ZigZag, MACD and Moving Average which are combined in this indicator.

Main chart shows the overlay chart of 2 symbols - while subchart displays the price spread line with spreadfactor.

A simple label that shows information like Ask & Bid, OHLC prices, volume, spread, remaining candle time, local & server time.

This is the improved version of the "HarmonikManual", with more attractive and easier to use.

The indicator shows support and resistance levels.

The indicator shows the distance between the open price and 3 different exponential moving averages (EMAs) in pips.

Custom MACD indicator with 2 tone color (MACD Up and MACD Down colors).

MonEx indicator is the Weighted Close (HLCC/4) candlestick bar combined with ZigZag indicator.

A very simple indicator to display the difference in time between candles in seconds.

This indicator will show the name of the pattern by placing point XABCD manually and also will search the next Potential Reversal Zone (PRZ) automatically.

This indicator will show balance sheet for a year.

The indicator supports two functions: 1. Ask and Bid line customization(style, thickness) and 2. Second Broker spread comparison.

Usual MACD with showing volumes on it.

Trading multiple instruments across multiple timeframes (and multiple brokers) can result in the use of many different templates. An immediate means of template identification is expedient in order to avoid confusion, trading inefficiency and possible trading mistakes. This simple indicator accomplishes the required.

The indicator shows Moving Average and oscillator in a separate window.

The indicator allows to control the Strategy Tester speed.

The Expert Advisor closes all positions if equity exceeds specified percent from balance.

"How much is a 1 pip movement on EURUSD (or any pair) worth in my currency?" - here's the answer!

It's a hedging Expert Advisor, which trades only one time per day.

Up/Down arrows drawn in chart window.

EA for Automatic StopLoss, Take Profit, Profit Lock, and Trailing Stop (With Special Methods). SL and TP could be hidden.

CSPA is a multi currency Expert Advisor, it uses the currency strengths to open trades on the best pairs.

MPM is a stop reverse strategy.

Graphical calculation of profit/loss from lot, or vice versa.

Syndicate Trader is coded from the basic VSA (Volume Spread Analysis) study by Wyckoff.

Flat indicator showing potential entry points.

This indicator shows High and Low points for certain timeframe.

The script allows you to get a certain section of the chart image specified by the user.

Use this script 2 minutes before high impact news pip moving faster FOMC, NFP, RATE BANK.

This indicator shows good signals based on modified MA.

New version of KNUX Expert Advisor. The strategy works with martingale.

The indicator shows the information about indicator values and important levels.