August
12
23:20
To help the trader

The scripts in Metatrader 4

Hello friends!In addition to advisors, indicators and trading systems, forex platform Metatrader 4 is such a thing as the scripts.And in the following instructions, we teach them to install, configure and implement.

What are scripts?

Script is a program written in MetaQuotes Language 4 (MQL 4) and intended for a single performing of any actions.The script can perform both analytical and trading functions.Unlike experts, scripts are executed on request, not by ticks.In other words, if the expert works almost continuously, a script, having once, on their own exits.

Roughly speaking, forex script - is a small utility that performs a one-time function (eg opening of the grid of pending orders, or the construction of some graphic figures), upon accession to the schedule.

How to use scripts?

The Metatrader 4 already has several standard scripts, such as opening and deleting items.You can find them in the section Scripts in Navigator window (usually at the bottom left).After pressing the butto

n + opposite section Scripts , a list of available algorithms.

To run the script on the right drag the graph or just click on it twice with the mouse.A window appears confirming activation of the script, for example, is:

Press Yes and the script starts.After performing its function, the script will automatically be deleted from the chart.But if you suddenly want to stop it immediately, you can do this by clicking anywhere on the chart right-clicking and selecting Delete script.

extra scripts in MT4

scripts can be downloaded from the relevant section of the forum.

  1. You Metatrader 4
  2. program Download the archive with the script, unpack it and get ex4 file and / or mql must be installed.These files are copied to the folder MQL4 / scripts in your terminal data directory.
  3. To get to the data directory in the terminal press File - & gt; Open Data catalog
  4. Product Information folder opens, there we go to the section MQL4 the catalog Scripts .And to copy the files to our scripts.Close the folder, restart MT4.Copying scripts
  5. Then go back to our terminal Metatrader 4, click on the top Service program panel - & gt; Settings and Advisors tab, tick stamped as in the screenshot below.Then click OK .
  6. Open schedule desired currency pair and drag it with the mouse to set the script (see. Application scripts at the beginning of this article)

How to change the script?

sometimes need to change the parameters of the script, for example to change the size of the lot being opened (if the script is the issuing of warrants) or some other add-on.For this we need to change the script code (only possible if the source code in the form of MQL file).

1. In the terminal script, click on the right mouse button and select the item Change .

2. Open MetaEditor application window where you can change the script.Be careful not to change anything too much, otherwise the script can stop working !!!

3. To save the changes in the code you need to click Compile , then MetaEditor'a window can be closed.

That's all.As you can see, nothing complicated in using forex scripts in Metatrader 4 does not.

P.S. Follow the blog via RSS-feed or twitter, so as not to miss the appearance of new materials from the world of forex trading.

Related Posts