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 Codes of Scripts for MetaTrader 4

Scripts are small applications that perform one-time actions. For example, you can delete all objects from a chart or place a set of orders for an open position. Find here hundreds of applications that can automate small analytical or trading functions.

Scripts are free to download and run in MetaTrader 4.

Submit your code
latest | best

In MetaTrader 4, we intend to calculate the intersection coordinates of two straight line objects with different slopes using MQL4.

With this script, you can send a message from MetaTrader 4 to Telegram.

Script that opens 2 orders - one set to close percent of position when profit equals stoploss, another set to close at TP

This script was developed in order to help us detect if a chart is actually trending or going nowhere.

The 8 effective steps to build a robust day trading plan using Fibonacci retracement

For day traders. 2 highly important indicators to turn strategies into extreme winning ones. The Win/Loss ratio and the Reward/Risk ratio will allow us to identify the best times and days our strategy works the best

For day traders, this is one of the important thing to consider in order to improve our strategy by calculating on average how much an asset moves, in which it will allow us to identify the best TIME during the day to trade when the market moves the most as well

This is one of the important thing to consider in order to improve our strategy by calculating on average how much an asset moves, in which it will allow us to identify the best days to trade when the market moves the most as well as the worst days to trade in order to prevent trading during these days.

Most traders keep losing money because they focus on money rather than planning their trades based on Percentage risk.

Are you tired and lost when it comes to creating an attractive market watch list ? You always see pro traders creating an attractive market watch list in which they draw support/resistance and create all possible scenario ? Well we will guide you step by step to create your own attractive market watch list for potential entries.

This strategy is the well known set & forget accompanied by the martingale system. It is very useful if you are very busy in which you don't have time, you want to trade the London session while you are sleeping in USA, etc.

This strategy is the well known set & forget accompanied by the anti-martingale system. It is very useful if you are very busy in which you don't have time, you want to trade the London session while you are sleeping in USA, etc.

Short description: This Script will draw a line from the open to the close for each order in you account history. please show all history in account history before using this script.

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.

Simple script to delete all object on the current chart.

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.

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

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 .

You can send pending order on closed market between StartTime and EndTime at specific minumum and maximum price.

The script exports summary of closed trades grouped by each trading day to .csv file

The script downloads the historical quotes data of a single timeframe for all symbols in the market watch.

This is useful if you want to earn and work on 5 min chart . it uses bb , ma 10, ma50 , Psar, slow s, one faster s and macd along with rsi to give a perfect view of market . if you need some help let me know in my email. rinkanrohitjena@live.com only works in mq4 language . just drag and drop on a five min chart

The script exports summary of closed trades grouped by each currency pair to .csv file

Quick scripts to remove Equity from a demo account for a broker that does not support anyway to withdraw.

Display interactive HTML graph of the account balance inside the web browser.

1) Close all order on the Symbol Chart 2) Take screen for keep a Trading Journal

This script will create, automatically, a CSV file with all your broker markets listed. We thought would be useful. We use it to integrate it with all our experts statistics. The CSV file will be created in MQL4/Files folder. Good Trading and good statistics!!

Execute pending order(s) according to lines in the chart you have drawn before.

Changes the zoom level for all opened charts.

Change the timeframe for all opened charts simultaneously.

Set all opened charts to use auto scaling or fixed scaling simultaneously.

The script downloads the historical quotes data of the current chart symbol and timeframe.

Calculate the average volume per hour in a 1 hour chart.

Script to start an external program.

This script provides quick work with a large number of pending orders in the market and contains functions for placing, changing, and deleting of orders within the your price range.

Can be used for hedging or trading breakout systems.

The script allows you to try regular expressions in MetaTrader 4.

After back testing, we usually need to analyze the testing result on a new chart which we have loaded our template,in this case we need to copy the objects on the testing chart to the new chart. This script helps to save the objects into a file and show the objects on a new chart.

The script downloads history for all timeframes and symbols in the Market Watch.

12345678