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

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.

To post a new code, please log in or register
latest|best

Mark your historical trades in you mt4 with lines and arrows. You can load data from your history or load data from a csv file.

Calculates the phase and amplitude of the expected wave.

for number of currency pairs.

Volatility Scanner in raw form for number of currency pairs.

Draws Pivot Points Level Lines for formula's Floor,Fibonacci,Camarilla,Woodie

This MT4 indicator is to count down the remaining time as the format HH:MM:SS

Simple script to delete all object on the current chart.

Independent Chart Indicator for MT4

Mirror indicator with a dropdown list of base indicators to choose from with optional alerts, email, and push notifications.

This is a simple function for the initial control of an expert.

Short description.

MT4 Expert Advisor based on the CCI indicator

This indicator is ZigZag based on Bill Williams Aligator

The GMT Time on chart indicator is written for users who like to see GMT Time on-screen. For convenience, This indicator code is written clearly and simple. Update 1: 16-5-2020 *Input font color *Input font size

Close your positions in profit virtually

Fully operational ea for real/demo accounts or educational purpose

The V Sync Chart Lite indicator is written for demonstration purposes and shows how it is possible to synchronize the object

Standart MACD Indicator but All Parameters like as FastMA, SlowMA and SignalMA parameters can be changed

It's a triangular arbitrage system (three pairs correlation system) to use 3 currencies to make 3 pairs to open hedge orders on those. The expert starts opening six orders for each ring (3 plus and 3 minus) and waits to move prices in one direction to make a grid of orders.

Simple Script to disable the Autotrading for the EA on the chart. If you just want to use the DLL, check the code and comment/uncomment the necessary

The Correlation Indicator provides a smoothed bar to bar correlation value.

Trend indicator (separate window)

Hi, so I just made a little code here that will help out a lot of coders that hate doing this (I count myself in it haha). It's made to calculate the lot size of a position based on the risk input and the account size+currency.

Trend indicator

Free utility for manual orders placement.

This EA can detect trades in your MT4 account and transmit them via web

Simple oscillator with a histogram.

Simply select one of the main currencies (AUD, CAD, CHF, EUR, GBP, JPY, NZD, USD) as "Currency" in the settings.

Power of USD indicator shows actual strength of currency USD calculated of 7 pairs that contain USD. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: EUR USD, AUD USD, NZD USD, GBP USD, USD JPY, USD CAD, USD CHF.

Power of NZD indicator shows actual strength of currency NZD calculated of 7 pairs that contain NZD. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: EUR NZD, GBP NZD, AUD NZD, NZD USD, NZD CAD, NZD JPY, NZD CHF.

Power of JPY indicator shows actual strength of currency JPY calculated of 7 pairs that contain JPY. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: USD JPY, EUR JPY, GBP JPY, AUD JPY, CAD JPY, NZD JPY, CHF JPY.

Power of GBP indicator shows actual strength of currency GBP calculated of 7 pairs that contain GBP. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: EUR GBP, GBP USD, GBP JPY, GBP AUD, GBP CAD, GBP NZD, GBP CHF.

Power of CHF indicator shows actual strength of currency CHF calculated of 7 pairs that contain CHF. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: EUR CHF, USD CHF, GBP CHF, CAD CHF, AUD CHF, NZD CHF, CHF JPY.

Power of EUR indicator shows actual strength of currency EUR calculated of 7 pairs that contain EUR. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: EUR USD, EUR GBP, EUR JPY, EUR AUD, EUR CHF, EUR CAD, EUR NZD.

Power of CAD indicator shows actual strength of currency CAD calculated of 7 pairs that contain CAD. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: USD CAD, AUD CAD, CAD JPY, EUR CAD, GBP CAD, NZD CAD, CAD CHF.

Power of AUD indicator shows actual strength of currency AUD calculated of 7 pairs that contain AUD. Indicator can be used for strategies based on mean reversion and/or correlation. Included pairs: EUR AUD, GBP AUD, AUD USD, AUD CAD, AUD NZD, AUD JPY, AUD CHF.

Non Lag Relative Strength Index for MT4 Eliminates unnecessary preliminary calculations on the built-in RSI.

This code extracts tick data from the broker's server and refreshes the 28 charts of the 8 commonly traded currencies in MT4.

This code closes when your position is based on dollars

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192