MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal

Source code library - Expert Advisors, Indicators and Scripts

Copy experienced traders' deals with MetaTrader Signals
To post a new code, please log in or register

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 Jobs section

MQL5 Source Code Library for the MetaTrader 5 - Scripts

Do you know that all the programs in the MQL5 library are available directly in the MetaEditor? Now you do not need to worry about which folder to use to download the code of an Expert Advisor, indicator or script - the editor does it for you.

Open its Toolbox (Ctr+T), go to the Code Base tab and select "Download" in the right-click menu - that's all you need to do to get a program source code!

previous123next
latest|best

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

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 imitating the One Cancel Other orders functional. When one order is triggered, the others are deleted.

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.

previous123