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

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

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

The script demonstrates the example of using the FileWriteInteger() function

The script demonstrates the example of using the FileTell() function

The script demonstrates the example of using the FileSize() function

The script demonstrates the example of using the FileWriteDouble() function

The script demonstrates the example of using the FileWrite() function

The script demonstrates the example of using the FileReadArray() function

The script demonstrates the example of using the FileGetInteger() function

The script demonstrates the example of using the FileIsEnding() function

The script demonstrates the example of using the FileFlush() function

The script demonstrates the example of using the FileMove() function

The script demonstrates the example of using the FileDelete() function

The script demonstrates the example of using the FileCopy() function

The script is a simple example of using the FileFindFirst(), FileFindNext() and FileFindClose() functions

These scripts are designed to sell with fixed values of Stop Loss and Take Profit in points from the current price

These scripts are designed to buy with fixed values of Stop Loss and Take Profit in points from the current price

The OpenSellPosition_X script is created to sell at fixed values of Stop Loss and Take Profit in points from the current price. Position volume is determined on the basis of the level of losses.

The OpenBuyPosition_X script is designed to buy at fixed values of Stop Loss and Take Profit in points from the current price. Position volume is determined on the basis of the level of losses.

MPC is a script which measures (searches) the most frequently occurring candlesticks

The script imitates the One Cancel Other function for orders. When one order is triggered, the others are deleted.

bts

Comparing the speed of a binary or a ternary search

The script for manual trade: when achieving the limit price the script sets stop order and logs out

The CSV file was written to write economic news but there was a problem that the Terminal does not distinguish lines, exactly their number when working with the CSV file. That is why I decided to share my solution of this problem.

The script calculates Pivot Point on all the symbols from the market watch and displays the results in html-file.

Export of all necessary instruments and time frames in one click with load and checking history

This script attempts to demonstrate the power of using support vector machines in solving classification style problems.

The simplest script to send instant PUSH-notifications to smartphone

This script displays several subcharts in a single chart window according to the number of currency pairs in Market Watch menu.

This is an informative script displaying data on the current trading pair in the chart window.

This is an informative script displaying data on the current trading account in the chart window.

The script is designed for closing open positions.

The script is developed for reversing open positions with fixed Stop Loss and Take Profit values in points from the current price and the volume depending on the reversed position.

Empirical mode decomposition of the current symbol.

The script is developed for placing a SellStopLimit order with fixed trigger levels, Stop Loss and Take Profit levels in points from the current price and order trigger prices.

The script is developed for placing a BuyStopLimit order with fixed trigger levels, Stop Loss and Take Profit levels in points from the current price and order trigger prices.

The script is developed for placing a BuyLimit order with fixed trigger levels, Stop Loss and Take Profit levels in points from the current price.

The script is developed for placing a BuyStop order with fixed trigger levels, Stop Loss and Take Profit levels in points from the current price.

The script is developed for placing a SellStop order with fixed trigger levels, Stop Loss and Take Profit levels in points from the current price.

The script is developed for placing a SellLimit order with fixed actuation levels, Stop Loss and Take Profit levels in points from the current price.

The script is developed for selling with fixed Stop Loss and Take Profit values in points from the current price.

1234567