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 and MQL5 Source Code Library

You don't know where to start learning the MQL5 or MQL4 programming language? Various programs for your MetaTrader terminal are available here. Download and study published code examples, develop your own indicators and Expert Advisors. Publish your applications in the largest library of MQL5 and MQL4 codes, and they will be available in every MetaTrader terminal and MetaEditor.

Your code examples in MQL4 and MQL5 will be distributed worldwide, and thousands of traders will know about you!

To post a new code, please log in or register

RSI Summed

Bollinger bands - squeeze

Squeeze - on chart candles or bars

Squeeze indicator

RSI swings

Aroon oscillator - multi time frame version

Aroon - multi time frame version

Set the number of consecutive candles along with RSI level for a valid signal.

Kalman filter - with candles or bars, multi time frame version

This is the version 2 of my script to export the trade history from MT5 selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software. More columns were added and fixed minor errors. The code for processing and exporting data was rewritten.

Kalman velocity - multi time frame version

Kalman filter - generalized version

Trix pivots

Rocket RSI pivots

Ssm RSI pivots

Simple support resistance

Simple intraday support resistance

T3 velocity tape

Detect bullish and bearish engulfing candles when entering the overbought or oversold territory. We have all seen a currency pair enter the overbought or oversold territory and stay there for long periods of time. What this indicator does is gives you the emphasis. So if you are looking for reversals then you may want to take notice when oversold territory is entered into with a bullish engulfing candle or if the trend is your thing then check for bearish engulfing candles while entering oversold.

CCI - double smoothed Wilder's EMA filtered with floating levels

CCI - double smoothed Wilder's EMA filtered

This script will export the trade history from MT5 selected between two dates. The resulting file is CSV that can be opened/imported with any spreadsheet software. Current version 1.0 does not add the takeprofit and stoploss. Any advice to improve this is welcomed.

Bollinger bands breakout

Bollinger bands - extended

Export history of deals ordered by close time from a retail hedging account to .csv file.

Simple harmonic oscillator

Simple harmonic index

Wave period oscillator

RMA - multi time frame version

M-oscillator extended

M-oscillator

RMA average

Kalman filter velocity

Double smoothed EMA - floating levels (multi time frame)

Double smoothed EMA - floating levels

Double smoothed EMA - multi time frame version

A trading system based on custom indicator VHF.

Expert Advisor Exp_SpearmanRankCorrelation_Histogram with the added option of trading within the weekly range only, the borders of which are specified in the EA's input settings

The indicator builds graphical object Fibonacci Levels with many settings at High and Low prices over the period specified in the indicator input parameters

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164