Watch how to download trading robots for free
Find us on Telegram!
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 - 39

icon

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

A robust EA template to use with your entry conditions.

Easy EA for closing positions of the symbol with profit or loss. You can use it for hidden SL too.

An EA template to add a simple trailing stop to your strategy.

MQL4 library that allows authenticating into a MetaTrader 4 account programmatically in release 880+.

Bollinger Bands with customizable moving average method and applied price.

This script creates a .CSV file of your order history so you can import it into Excel and analyse it using the calculated heat map slots and other calculated values. All trading attributes are extracted from the history and output to the .CSV file. Updated version 1.03 (about 27KB) has NetProfit, OpenDay, OpenHour, OpenSlot, CloseDay, CloseHour, CloseSlot, DurationMinutes, PotentialWinPips, PotentialLossPips and others. The file is tab delimited for easier conversion from text to columns in Excel. Times are server time. Handles 4 and 5 digit brokers and 2/3 and 4/5 point value pairs, e.g. JPY correctly.

This version of CCI indicator uses median line of the Step Channel indicator.

Money Management / Pivot / Daily Open / Support-Resistance / Grid / Information of all kind / Tendency indicator.

This an H1 strategy. This EA will execute at the new bar if the last bar has broken through the point that we set.

This indicator shows Step Channel based on volatility.

This EA will show the button that can used to close all orders by the current chart symbol.

Money Manager Graphic Tool shows Lot Size, Ratio, Risk and opens orders (Buy, Sell, Buy Stop, Buy Limit, Sell Stop, Sell Limit).

This indicator plots the values of the user specified ATR period for all timeframes as a text block. The text block corner can be changed by the user.

Draws a Triangular Moving Average on the chart.

This indicator shows Wedge pattern.

Simple button to change the timeframe directly in the chart.

FuzzyNet library for developing fuzzy models was written in C#. While converting to MQL4, 8 membership functions and 4 defuzzification methods for Mamdani-type systems were added to the library.

This indicator shows 3 periods ATR LWMA.

This new representation helps to see charts in a new different way.

Simple way to control your orders.

Library provides functions for management of MetaTrader 4 to MySQL database connections. Fixed memory allocation and release problems of the original library.

This indicator shows Flag and Pennant patterns.

Easily create horizontal lines by 1 key stroke, choose the color of the resistance line and the support line, the indicator automatically changes the color when a line is crossed, you can be alerted when a line is crossed. You can see the history of support and resistance of the line.

RSI EA based on overbought and oversold levels.

Personal Assistant The Next Generation is there to make your trading easy, basically it does what a real assistant does — provides information and executes your orders.

This indicator shows trend line or channels (using the BSI Indicator).

Personal assistant is there to provide you with crucial information for making investment decisions and to execute your orders.

This script will help you calculate your lot to open position.

This Expert Advisor trades on the principle of the Martingale: if the order is closed by Stop Loss, the next order will be the opposite type with a lot size increased by a certain rate.

This simple indicator will change the timeframes of the current chart with keypress.

This indicator shows channels using the price histogram.

Indicator of support and resistance levels based on Open Close High Low Weekly Candle.

This indicator shows four price histograms when a chart click event is fired.

Expert Advisor I have developed for News Time Trading (set time and leave it).

The Hull Moving Average (HMA) is an extremely fast and smooth Moving Average that almost eliminates lag altogether and manages to improve smoothing at the same time.

Bounce Strength Indicator (BSI) shows the strength of bounce. It now works in trend and uses Tango Line calculations.

This indicator is a sharp turn to the dynamic change of direction. Like tango steps!

The indicator is a histogram of the lowest/minimum spread only, given in a candle whilst the indicator has been running. Example scripts for placing buy or sell at the lowest spread are included.

Reversal Navi indicator shows the entry point coming after the reversal bar.

Bounce Strength Indicator (BSI) shows the strength of bounce. Inspired by the Wyckoff method.

1...323334353637383940414243444546...101