Lesson 12: Indicators and Scripts
In this tutorial you will learn about indicators and scripts. Indicators are graphical
and/or metrical tools which enable you to analyze the market conditions.
MT4 contains a database of indicators and scripts by default. You can see them in
the submenu of the navigator panel but you can also access the indicators by using
the insert tab in the main toolbar.
First of all we will explain how to enable and use additional indicators downloaded
from the web. After you have downloaded a custom indicator, you need to copy it to
correct folder so that the platform can recognize the file. Then you need to find the
data folder of the client terminal.
You can access the data folder by clicking on “file” and “open data folder”. After
this, open the MQL4 folder and find the indicators folder then copy your custom
indicator to that specific folder.
Remember that in scripts, with regards to Expert Advisors, the subfolder must be
chosen accordingly. In order that the client terminal can recognize the updated
database, MT4 has to be restarted. Once you have restarted the platform, you will be
able to see your new custom indicator on the “custom indicators’ list” located in
the navigator window.
Now let’s look at how to attach the indicator to a specific chart. Double click the “new
indicator” tab and the new indicator window will appear. In the custom indicator
window tab, you can adjust colours and options.
You can also enable the DLL (Dynamic Link Library Imports) which allows you to
import the data to your excel sheet so that you can monitor or analyze live feed data
from MT4. Should you want to delete the indicator from the chart, simply right click
and select it from the list of indicators.
It is also useful to know that you can edit the features of the attached indicator at any
time. Otherwise, the newly attached indicator can be saved in the template file.
If you want to attach multiple indicators to one chart, you can save time by creating a
template file and attach all your indicators instantly. You can learn more about
indicators in a separate module.
Scripts allow you to perform trading operations instantly. There are various types of
scripts - such as for opening trades, closing trades etc. The difference between
indicators, scripts and expert /advisers is basically the following;
Indicators help you analyze the market. Scripts perform market activities and you
don’t need to activate them repeatedly. Expert Advisors allow you to back test your
trading strategies and perform automated trading.
To enable execution of your scripts, go to tools, select options and when the
options box opens, tick “allow live trading”. On MT4, all the scripts, indicators and
Expert Advisors were written in the programming language called MQL4 - or Meta
Quotes Language 4.
This means that you can only write or modify your own script by using the Meta
Editor option or by right clicking script and selecting modify. You can find out
more by pressing F1 in the meta editor user-manual.