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.

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

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 quote 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.

This script is used to convert history data from M1 to M5, M15, M30, H1, H3, D1, W1, MN.

This script removes all instruments with spread higher than the specified maximum requested and it also removes all non-trade enabled instruments from Market Watch, which allows you to concentrate on items you may want to trade without all the clutter.

This script is used to modify StopLoss and TakeProfit.

This script scans for open orders and sets a fixed stop loss and take profit to all of the relevant.

A script used to submit market or pending orders with take profit and stop loss levels, lot size, and optional trailing stop.

This script allows you to close orders with one click, filtering by profit, loss, magic number and comment.

OpenOrder script allows you to open an order defining the % of balance to risk, the Stop Loss distance in pips and the Take Profit distance in pips and a magic number.

Open positions in MT4 with absolute control of the risk / reward ratio, automatically calculating the lot size.

Basket offline chart creator script using geometric mean method.

Script for drawing a price markup.

When run on the price chart, the script modifies the stop loss or take profit of all open orders for the current instrument.

The script is designed for opening trades on binary options via the MetaTrader 4 terminal, if your broker supports this feature.

Downloads the history of Alpari PAMM accounts and displays it on the chart.

Immediately deletes the SL/TP of all positions.

Total closure of all positions (winners/losers). You can also select which are of a single instrument.

Closure of all positions with a loss. (You can indicate a specific instrument if you want to).

Closure of all winning positions. (You can indicate a specific instrument if you want to).

The script modifies all orders (market and pending) on the symbol with specified Take Profit and Stop Loss.

This script is used to calculate lot rebate.

The script plots a "Tic Tac Toe" chart in the form of Japanese candlesticks.

Expansion and improvement of the script ver.2 and an example of accelerated processing of an indicator for use in conjunction with the script

Modernization of the first version of the script with the ability to manage multiple indicators

The script allows to preview the indicator behavior on a real chart from the specified point with the minimum computation resources.

When assigned to a hotkey, the script allows to almost instantly open limit orders with the specified risk level (in the deposit currency) and take profit (so-called braces).

Calculation of the number of lots by Anton Trefolev.

The script visualizes the deals on the chart in a convenient way.

1234567