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

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

One of the divergence subtypes.

Indicator that displays the change in price as a percentage relative to the Open price of the current candle.

The Expert Advisor that moves the stop loss to breakeven after reaching certain profit.

The Expert Advisor that performs order trailing after reaching certain profit.

The Expert Advisor is designed for placing managing grids.

Sells at downward crossing of 70, buys at the upward crossing of 30.

The indicator displays the price pivot point.

The Expert Advisor places pending limit orders at the specified distance from the price and trails them after the price with the specified step, applies martingale.

This indicator displays the current spread of the instrument and the time left until the current bar closes.

When run on the price chart, the script modifies the stop loss or take profit of all open orders for the current instrument.

The OandaX OrderBook Chart indicator is designed for displaying the history histogram of orders or positions history on the instrument with reference to the chart scale.

The script is designed for opening trades on binary options via the MetaTrader 4 terminal, if your broker supports this feature.

The indicator is designed for testing manual strategies and for practicing working according to the strategy. It provides operation reports presented as a table, chart, and additionally saves templates with and without the markup.

The Expert Advisor opens positions after the price passes the specified distance. 1 step up - sells, 1 step down - buys.

The SAW_system_1 Expert Advisor places pending orders on the basis of the volatility for the last N days.

Rapid Application Development library.

The indicator is designed for calculating and displaying the options levels on the screen.

An example of creating a trade panel using the MasterWindows library.

Modification of the standard Awesome Oscillator by Bill Williams. Recommended timeframe - М15.

A library of classes for creating a user-friendly interface of your programs.

After a loss, the EA opens orders with stop levels increased by the coefficient.

Martingale grid EA. The main idea of the EA is not in accurate entries, but in flexible plotting of grids.

Displays important parameters, which can change during news release or on Fridays before closing.

Downloads the history of Alpari PAMM accounts and displays it on the chart.

This indicator plots bullish and bearish gaps, and crosses/hides closed gaps.

Immediately deletes the SL/TP of all positions.

Total closure of all positions (winners/losers). You can also select which are of a single instrument.

Closure of all positions with a loss. (You can indicate a specific instrument if you want to).

Closure of all winning positions. (You can indicate a specific instrument if you want to).

Shows multi timeframe (M1, M5, M15, M30, H1 , H4, D1) RSI indicator in a separate window.

OBz library of trading functions: position size, open, close position etc.

Indicator detects the Inside Bars and marks them high/low (no redraw).

This is a great beginners' example of the function OnChartEvent() & creating objects on the chart to access them for some tasks.

Awesome Oscillator, customizable, 4 colors (as seen on some AIMS YouTube videos), and some more parameters.

This indicator is based on the moving average, but it doesn't use any standard moving average indicators.

Two EA's. One places Stop orders the other places Limit orders.

Renko chart generator using the tick values.

Fast time range checking function. Doesn't use slow string parsing.

The script modifies all orders (market and pending) on the symbol with specified Take Profit and Stop Loss.

Buy or sell just by looking at the "arrow" as a signal. Very easy and simple.

1...151617181920212223242526272829...102