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

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

Nadaraya-Watson estimator - metatrader 4 version

An optimized version of the Zigzag indicator, which was included in the MT4 delivery of 2005 (and in MT3.83).

Read news from forex factory website by web request

G channel is a channel indicator with 3 lines- a middle line representing a central tendency and 2 Upper and Lower boundaries calculated based on the past values of same indicator. Its based on the paper "Recursive Bands - A New Indicator For Technical Analysis" by Alex Grover and is a code conversion from TradingView. The channel breakout of Upper or Lower boundaries represent a new trend or trend continuation while narrowing of bands represents ranging or low volatility conditions. The channel can prove to be a good indicator of a trend direction and also a guide for trailing of stop loss. It has only 2 variables. Channel period - default set to 100. Price type.

Use trailing stop point with MT4

ATR with 4 smoothing options : RMA, EMA, WMA, SMA

Sharing this trend indicator made by me. Called "Timeframe Flow". It will draw a user defined higher time-frame candle on every shift on your current time-frame. Meaning you can have H4, H12 or D1 candles on every shift of your H1 Charts. Or you can have D2, D3 or D5 candles on every shift of your Daily Charts. Combined with the current time-frame ATR Bands, you have a trend indicator with some filter. You may also use the Mid Line crosses as exit( Calculated using Higher timeframe candles displayed in the indicator(Close + Open)/2 ).

Building good trading habits by seeing things in terms of percentage not in terms of money.

Script to download EVZ data for Euro FX Vix indicator

Determines when market price is smooth or rough

Building good trading habits by seeing things in terms of percentage not in terms of money.

Custom Function To Get Comma Separated Things From String.

This Custom Function Will Help To Get Round Time For Any Given Timeframe And Time.

Displays direction of volatility and volume

Turn your losing trade into winning trade with Zone Recovery Hedge

This indicator is used for identifying extrema of different degrees.

Indicador Mass Index para Metatrader 4 con los niveles más importantes en donde se producen las señales de este indicador, de acuerdo a su autor. El MI es un indicador basado en la volatilidad del mercado.

Indicador de medias móviles Hull (HMA) para Metatrader 4 que cambia de color dependiendo de la tendencia. La HMA es una media móvil diseñada para seguir de cerca la acción del precio más reciente pero sin perder el efecto de suavizado. Puede resultar muy útil para el análisis de tendencias.

Candle cross either of three lines.

Have you ever wanted to add another trade only after the previous has been modified by either trailing stop or even break even , This code will help you to be able to implement that

Volatility indicator

trending breakout

candle pattern

The Momentum-based Adaptive Channel is a version of the adaptive channel based on the Euclidean distance. It is designed to adapt according to the dynamic market as needed.

macd divergence and rsi

Checks a trading robot must pass

candle cross 3 moving averages

A customizable logging library with Debug,Info,Error logging levels.

Building good trading habits by seeing things in terms of percentage not in terms of money.

Tipu MACD EA is a simple EA created to automate buy/sell orders based on the MACD indicator. You can automate entries and manage trades. This EA comes with many useful functions that can used to by anyone to create their own EA.

I started to create a simple trading panel to switch between pairs and timeframes. and next version, I will add trading features and manage orders.

This EA, Ask you to Put price, whatever price you put, in "ZEN" field, you will get that price on all open orders either SL or TP value, that would help to close all orders at one price, and you can close all bulk orders in one shot. (works very well with large balance - i suggest cent / micro account for newbees. to be able to place large closure of orders. Openin random orders manually with ongoing trend is suitable for large order accounts.

The FM Demodulation Indicator tracks the timing of price variations.

Building good trading habits by seeing things in terms of percentage not in terms of money.

Clone of Smart Envelope from tradingview

Redrawing trading position for history data and current trading position

This RSI stop and reverse indicator makes use of RSI on price v2 code. If required the RSI level bands can be hidden.

What if we could have two Stop Loss instead of one?

When you scalp manually, a simple EA could be an assistant to set StopLoss / TakeProfit for each trade you open.

1234567891011121314...102