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

icon

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.

Submit your code
latest | best

This script reads all opened position and calculates their exposure for each currency.

The script converts the time, represented as datetime variable into the year, month, day, hour, minutes and seconds.

If you need to show just a part of the image at the moment and hide other, you can use the moving window by specifying the visible area of the image.

The script downloads historical data (for the current symbol), available at trade server.

Simple script with demonstration of use of the ChartNavigate() function.

The example of chart background image, created using the object of OBJ_BITMAP type.

This script exports indicator's values to CSV file.

New version of the sChartsSynchroScroll script.

This script generates a file with its source code (solution of the classical program in MQL5). It may be useful to study programming and algorithms.

The script allows you to place the deals history on the chart using the graphic objects.

The script exports historical quotes data from MetaTrader 5 for the import to MetaTrader 4. This solution will allow you to get the full history for MetaTrader 4.

Since Terminal build 344 added display of economic calendar news using special graphical objects (OBJ_EVENT). A script that outputs as a demonstration of the Economic Calendar with current economic data, the date of the last major (Pink) event.

The script calculates the number of lots to trade using the specified percentage of risk funds.

The script purpose is to export historical rates data to format, convenient for analysis in external programs.

The script gets contents from the Windows Clipboard.

Here is a simple example that shows how to download page(file) from Internet using the library wininet.dll.

The script provides a synchronous scrolling for all charts opened in the client terminal.

The script illustrates control of chart properties using the classes from the Standard Library (CChart).

The script illustrates control of graphic objects using the classes from the Standard Library.

12345678