To post a new code, please log in or register

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

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.

previous12345678...61next
latest|best

A very simple indicator to display the difference in time between candles in seconds. * Version 2, corrected array alignment and calculation of the current bar time.

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

This indicator exports the indicator values in CSV to use for MATLAB analysis with neural network, SVM, KNN, fuzzy.

The Expert Advisor can be used for Trailing and hidden Take Profit/Stop Loss.

This Expert Advior is based on one of 17 Proven Currency Strategies by Mario Singh.

Order_EA is a simple visual oriented program that uses drag & drop scripts to control order processing.

Draws two labels: Open-Close and High-Low range of the last closed candle left of the current candle.

Possible uses: Mark session open/close, mark time of regular news release, any other relevant time.

The indicator draws candle objects in a separate window of any one of the following indicators: Percent Range, RSI, CCI, Price.

Hybrid Scalper is the Expert Advisor based on many indicators.

This script makes horizontal lines, that shows max and min price values for a period of time.

TrendCollector is the EA based on price action, Stochastic indicator, specific EMA's (206) crossings, and trade size variability based on ATR and time of a day.

This Expert Advisor is based on Murrey lines, Stochastic Oscillator, Bollinger Bands and Candles.

The EA manages open position with a user defined Trailing Stop.

This indicator shows when to open positon.

NineTFMovement indicator gives an overview of the price movement on 9 timeframes (M1 to Monthly).

ATR Levels indicator marks 5pm NY on the chart along with the 14 day ATR value.

The script deletes all objects on all active charts.

previous12345678...61