Download MetaTrader 5
Subscribe to a trading signal and copy successful traders' deals!

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.


This script plots MQL signal history on a MetaTrader 4 chart.

Close, Delete or Clean values from all orders by your choice.

The script analyzes the market based on two criteria: the moving averages and the support and resistance levels.

Script that closes orders and (or) deletes pending orders.

The converter of the tick files created with the Ticks collector into different data representation formats.

The script tests the computer in 45 performance tests. It is possible to compare the performance of VPS/VDS servers.

This script creates a .CSV file of your order history so you can import it into Excel and analyse it using the calculated heat map slots.

This script will help you calculate your lot to open position.

This script lists current open orders with profit.

Easy to use an open trade script.

This script shows you current currency pair spread, pip value and the total cost of the spread to open a position. Result will show in your account currency.

Simple code to close all opened orders.

The script reverses all the orders of the actual chart symbol.

The script creates an ellipse on window drop.

Script deletes selected object types from the charts (current chart or all active charts).

The script allows you to get a certain section of the chart image specified by the user.

Use this script 2 minutes before high impact news pip moving faster FOMC, NFP, RATE BANK.

This script makes horizontal lines, that shows max and min price values for a period of time.

The script deletes all objects on all active charts.

A simple script to close multiple market orders.

Clear All StopLoss n TakeProfit on All Orders.

The script gets all the symbols available on your platform and writes their closing prices for a specific bar to a csv file.

This script automatically closes all open orders within few seconds.

The script closes all charts for the specified symbol.

The script copy objects (Trendline, Horizontal Line, Rectangle, Fibo) from active chart to all charts in this same symbol.

Easy script to help analyze specified symbol, it opens 8 new charts with different periods and applies a specified template.

A collection of scripts for closing various types of orders.

The script recognizes and shows peaks and valleys of certain period.

Someone needed a quick way to open the Alert window again, after they had closed it. Place this script in your \experts\scripts folder.

Someone asked me to provide them a way to close all their orders. This script will serve that purpose. Place this script in your \experts\scripts folder. When you want to close all the orders just drop this script on a chart.

popup tip: any bar's local time, with help of a verticle line.

Take screenshot in the original chart size with labels (instrument, timeframe)

Check out any MQL5 closed positions on a chart.

A collection of predefined Scripts immediately available for use without having to key-in. Step-by-step instruction how to make your own Scripts from Scripts Collection.

Weekly and Monthly Pivot shows resistance and support lines of pivots using classic formula

English version of AllAmplitude.mq4 The original script was posted here: . The output file will be stored in the MetaTrader 4\experts\files\ directory. The file name contains following information: "Symbol_Period---da

With 3 settable parameters (currency pair, timeframe, and template) opens a new chart on your screen at the initalization period of the script.

This scrip will close all your open positions in your MT4. You just need to drag it to the chart.

This script can close all your pending orders in your MT4, or you can select different pending orders.

This script can close all your open positions in your MetaTrader 4, or you can select different similar positions.