Download MetaTrader 5

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

MQL5 Source Codes of Scripts for MetaTrader 5

Scripts perform one-time actions in MetaTrader 5 using an MQL5 program and are deleted from the chart immediately afterwards. Sample functions include uploading trading history, generating a report and sending it by email, downloading and processing data from a file. Scripts can also be used to create graphical interface or quickly execute single-type trading operations, for example, close all positions immediately.

You can download and launch offered scripts in MetaTrader 5. The library of scripts is also available directly from MetaEditor development environment allowing you to learn MQL5 programming.

123
latest|best

This script is used to modify Stop Loss and Take Profit of position.

An example of using HistorySelectByPosition (based on the HistoryDealGetTicket use example).

How many buffers does your indicator use? What's it calculating? Is it efficient? If you want to know what's going on behind the scenes, you'll now be able to.

Converts .set files from MT5 format to MT4 format.

An example of working with the trading history on Hedge accounts — reconstruction of positions.

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

Searching Nearest Bar - searching for the nearest bar.

The script allows you to try regular expressions.

The script displays the brief statistics for trading on the instrument over the specified period - the number of deals, profit, profit factor.

The script switches all opened charts at a certain interval. It is also possible to display only the charts of certain symbols.

Symbol for downloading the history data for the current symbol with indication of progress.

Script draws the Axel Rudolph levels

Script to set correct scale on Fibonacci arcs attached to chart.

The script displays the monthly and weekly levels on the chart.

Script for drawing a price markup.

Calculation of slippages of the performed deals in account currency.

Adds period separators to your window, at a time of your choice.

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

This script closes all windows of selected symbol or all windows of any symbol.

The script displays the number of bullish and bearish candlesticks.

An example of counting the number of objects in the chart window.

The script shows the trade volume in lots required to move the position to a desired level.

The script controls the display of time and price scales for all open charts or only for one chart.

This script finds DeMark pivot points, displays them on the chart and indicates their dimensions.

This script finds DeMark pivot points, displays them on the chart and indicates their dimensions.

Setting multiple charts at one click.

An example of posting a message containing an image on the MQL5.com website using the WebRequest() function. This is an example of how to authorize using a login and a password, and to insert an image into a text message.

Script to apply my template to all charts opened.

Simple script for apply template and/or timeframe to all charts opened.

When you drag this script onto the chart, it will calculate the price where you drop the script and use this price to figure out if a Sell Stop or Sell Limit pending order should be placed.

When you drag this script onto the chart, it will calculate the price where you drop the script and use this price to figure out if a Buy Stop or Buy Limit pending order should be placed.

A simple script that allows you to open a Short position using the current price location with a specified Risk Percentage and Reward Ratio.

A simple script that allows you to open a long position using the current price location with a specified Risk Percentage and Reward Ratio.

Modified scripts to change Charts(next,previous) and Timeframes(higher,lower) of all charts quickly by hotkeys.

A script to place straddle orders around current price level to catch price spikes around announcements.

The script allows to set transparency level of the client terminal window using Windows API.

The script calculates candles statistics (the minimal, maximal and average values of candles body and shadows) of the current chart.

The script is assigned to a hot key for quick change of charts around in a circle.

Easier visual analysis of graphical objects created by the strategy tester.

The script for searching the maximum, minimum and average values of candlestick size

123