Download MetaTrader 5

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

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.


Opens specified orders at a specified time

The EA open position on Breaking S/R , it will make offsets if that was not a break

This code simply display ask-bid value.

EA scalper 1430% = 2011!!!

Simple Daily pivot.

This Robot uses the default zigzag indicator from Metatrader.

Close all trades after reaching defined profit or loss

Center of Gravity Indicator plotted on MACD values in sub window.

Butterworth filtration.

SuperSmooth filter

MACD using gaussian filtration

Calculates pip difference between Current price and SL & TP price. Places Text labels at SL & TP lines: Order Type, Ticket number, SL & TP price, Pip calculation and Pip label.

Updates: 1. Order Type Discrimination 2. SL+TP and OE line price. 3. Enhanced user defined labels. Calculates pip distance between Order Execution price and SL & TP price

StDev Bands with gaussian smoothing

Rainbow through gaussian refirtration

EA is based on 2 MA (High and Low). Long position will occur when Ask > MA(High) and Short position - when Bid

Closes all orders when total cash profit in the account is a certain value.

This indicator is calculating numbers of ticks and average time between ticks for each minute in the current hour.

This EA is based on the 10 SMA moving average and another things which could be better - It also make sounds according to the context.

This expert advisor is based on the concept that market does not move always in one direction. Even when the market is trending in one direction at some points it pullback. The EA has been backtested from July 1, 2011 to Jan 13, 2012 on EURUSD. It has

Notarius - trend indicator with alerts on the basis of price averaging.

This version 2 of Multi currency pair Indicator. It includes an optional trend line and the color of the label has been changed to red to make it visible on default chart template.

disturbed EA wich open a long and a short position at the same time.

This indicator watches the major currency pairs to find the status of the current candle (Bullish or Bearish) of USD, EUR, and GBP compared to other currencies such as EUR, JPY, GBP, CHF, AUD, and CAD.

This indicator use in cross ( es. EURAUD, GBPAUD, EURGBP, ect) depends of correlation of currency. Usually I use with timaframe Daily. But I think can to use in another timeframe. Important can use in commodity and stocks.

Calculates pips between Order Execution price and and Stoploss or/and Takeprofit price.

My first trading System using simple pattern.

The InsideBars indicators can be used for trading with breakout Strategies.

This Expert Advisor is based on 3_Level_ZZ_Semafor indicators.

Oscillatior indicator that counts Up bars (Close-Open) and Down bars (Open-Close).

Expert Advisor EUR/USD (1H) +78% win.

Based on two MA.

Displays the trades from the history as visible lines on the chart

Exports your history into a .csv file which can be read by excel or similar. You can sort your trades and see easily how much a certain EA won or lost.

yesterday market close european market or NYSE close price

Two modified COG indicators. Center of Gravity on Stochastic in sub window and enhanced On Chart COG.

This is the Figurelli RSI automatic gain version, so input parameters is the same as original Welles Wilder RSI (i.e. period setup). The indicator figures out the gain value based in minimal and maximal values inside the sample and period programmed.

EA achieved best results on Renko Chart. Renko Chart is not mine but I used it to write EA on it. EA can trade every pair but I got best results on GBP/USD and EUR/JPY. I'll appreciate any comments.

The indicator is similar to Bollinger Bands (this same idea), but it uses GruchaAvarage instead of MA for counting.

Opens sell, buy or both orders at a specified time.