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


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

Two RSI indicator periods smoothed and displayed as histogram.

Heiken Ashi codebase new design by Nguyen Tat Dat

Nadaraya-Watson estimator - metatrader 4 version

Recode and new define: Standard Deviation, Moving Average

Ferox Muti Timeframe Viewer

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

Thuật toán đường trung bình trung tâm lượng giác

FX Margin Request Per Lot Calculator Tính yêu cầu ký quỹ cho 1 lot

Close All Order

Định dạng chart

Tải toàn bộ lịch sử ra file .csv

Mở đồng thời nhiều lệnh cùng lúc

Nến mẹ là InsideBar, Price Action

Cấu trúc của file HST

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.

RSD Oscillator, Relative Strength deviation is the calculation of precision in data analysis. Relative Strength deviation is calculated by subtracting applied SMA on RSI over RSI period. RSD uses a raw series equations of continuity to explore itself inline with markets demands..

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