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.

Submit your code

The indicator displays a channel based on the moving averages.

The EA searches the last upper and lower fractals and opens positions when the price exceeds these levels.

Display of the Heiken Ashi candlestick indicator in a subwindow.

One of the implementation variants of the Quantum trading system.

The EA opens trades at the intersection of the fast and the slow MAs. It has the function of outstaying the losses.

The EA closes orders when certain loss is reached by them in the account currency. It is possible to vary the loss by the volume of the order.

Script for opening opposite stop orders at a specified time. Once one of them triggers, the other one is deleted.

The RSI with dynamic levels.

The indicator showing the supply and demand zones.

Example of creating info panels.

Trading robot based on the theorem "On the presence of memory (aftereffects) in random sequences".

The script is designed to place orders at the time when it is not possible, for example, when the market is closed.

A simple Expert Advisor, which works without the use of any indicators. Enters at trend reversal attempt.

Display of a symbol's chart in a subwindow of another symbol.

Triple Exponential Moving Average with customizable parameters.

The channel indicator plots a linear regression channel.

The Super Trend indicator not only determines the trend direction, but also helps to detect the Elliott waves.

The indicator displays the equity and balance charts.

Reveals distance from the actual price up to the breakthrough of recently set support or resistance levels.

The script determines the price at the point of the chart, on which it was dropped down, and depending on that it places a grid of orders.

The indicator shows the length of the trend line in points.

Plays sound alerts when the price reaches certain levels, specified by trader.


The Heiken Ashi Naive Expert Advisor is based on the Heiken Ashi candle chart system and uses the standard indicator of the same name.

Shows the current gain and loss for the candlesticks on the chart.

A simple visualizer of trends.

The indicator shows current trend direction by placing colored dots on the main chart.


The indicator detects and marks the WRB (Wide Range Bars) or candlesticks with Wide Range Bodies.

The indicator of divergences on 30 oscillators of choice.

The Expert Advisor is based on the exponential moving averages of the same period.

The Pinbar Detector indicator tries to identify the pin bars.

The Aroon Up and Down indicator detects the local tops and bottoms on the chart.

The Coppock indicator shows long-term opportunities for buying or selling.

3rd Generation Moving Average

The Expert Advisor is based on the operation of its predecessor — Forex Fraus (for M1), but using the Envelopes indicator.

The classic Moving Average indicator with a color change depending on the direction.

Tick volumes indicator. It shows the price change with an increase and decrease.

The strategy by Daryl Guppy is implemented using this indicator.

The Expert Advisor is based on the lot management according to the Labouchere system.

The Expert Advisor trades by breakout of High or Low of the previous candlestick.

The Williams Percent Range indicator, in which the indicator period is calculated automatically using the number of bars of the current day.