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

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

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 will create an offline chart for the ticks.

Indicator that displays the "strength" of each of the 8 major currencies (USD, EUR, GBP, CHF, AUD, CAD, JPY and NZD) based on the moving average trend of all 28 pairs that they are part of.

Stochastic MACD (metatrader 4 version)

Best Direction Indicator. Red Line means the market UP. Blue Line means the market Down.

Arrow for input and Smile for output.

A ready made expert adviser template to use for further development

Trend flex x 2 (metatrader 4 version)

Basic Template for Multicurrency Expert Advisors.

TrendFlex indicator based on February 2020 TASC article published by John Ehlers - metatrader 4 version

Reflex indicator (based on February 2020 TASC article by John Ehlers - metatrader 4 version)

This EA is for testing No Nonsense Forex algos. With this EA you can test your algos much faster than eyeballing, using Soft4x or using any other EAs in Strategy tester.

Simple indicators detect engulfing candle patterns, but with a moving average filter

I recently needed an indicator that, once placed in a window, is able to change the Time Frame of all open windows. In addition, I wanted this indicator to be able to react to Metatrader's Time Frame selection bar. Despite my various searches, I couldn't find anything suitable. So I decided to develop my own indicator. I propose it to you here.

Simple Trailing Stop EA with Trailing Steps and Trailing Start Point It includes Stoploss and TakeProfit too..

A ready made expert adviser template to use for further development or use 'as is'

PricerEA is a utility to help any trader to place pending orders (stop or limit) at a specific price.

This indicator watches and displays the biggest spread the pair generated. It is recommended to run at least 5 days, from Monday to Friday, to get a big picture of the broker's spread.

Previous day&week High/Low

RSI with Bollinger Bands calculated on it

Dynamic Pivot Indicator, provide all timeframes and extra timeframes

These codes give you a list of currency pairs that have a positive and negative swap. This is useful when you do a Carry Trade strategy.

Let's say we have 20 open orders on one symbol and want to set takeprofit or stoploss for all of them at the same level(price) .The script selects all open orders of the symbol and can modify stoploss or takeprofit or both at the desired level (price). If the input parameters are left to zero , the stop or the takeprofit are left unchanged .

Dynamic Stop-Loss is a tool for traders who trade without a stop-loss. It gives the traders a trick to trade as if there is no stop-loss but actually using one.

Candle Cross above or below Conditions

Safe Trend Scalp is an automatic robot that trades with automatic Trend lines that ea crated with market history.

volatility, flat

this is RSI indicator that has two moving average inside the window

Simple pivot indicator

It's an expert to open and close orders on a specific day and time. Expert open and close orders only with the same symbol attached. For more information, please visit product's page: https://www.mql5.com/en/market/product/44939

"X Man" EA uses Equity Stop from total Equity, you can use it as hedging grid EA or a single trade EA.

Ichimoku Kinko Hyo is an indicator that tracks the equilibrium of momentum and identify likely areas of support and resistance. The Ichimoku chart is composed of five (5) separate indicator lines. These lines work together to form the complete "Ichimoku picture".

The indicator shows BID-ASK-SPREAD information on chart

iWPR+ is an iWPR %Range function with a positive value.

1...5678910111213141516171819...102