Download MetaTrader 5

Secrets of MetaTrader 4 Client Terminal: Alerting System

13 September 2006, 14:45
Tatyana
16
9 728

    System Events


Open the "Tools -> Options" menu and go to the "Events" tab. By default, a WAV file is used to alert about one of eleven events.



These files can be found in the \MetaTrader 4\sounds\ directory of the Client Terminal. The alert can be modified as desired. To do so, open the popup list in the "Action" column by double-clicking with the left mouse button on the selected line.



The alert can be both a WAV file and an executable file ("EXE", "VBS", "BAT").



If a file of another type is chosen for alerting, the application related to this file type will be launched. After having selected an action, press Enter to confirm the choice. The event alert can be disabled by double-clicking with the left mouse button on the line in the "Event" column.


    User-Defined Events


Custom events can be of two types:

  • the price reaches the pre-defined value for the desired symbol;
  • the pre-defined timeout is reached.

 

To set up alert, you have to go to the "Alerts" tab in the "Terminal" window and press Insert.



The alerts can be enabled/disabled by pressing Space, and modified by pressing Enter.


Alerts can be of three types: a sound alert, an executable file, an emailed message. For all alert types, it is necessary to specify the "Symbol" and conditions (fields "Condition" and "Value"), at meeting of which the alert will trigger. In the fields named "Timeout" and "Maximum iterations", it should be specified how many times and with what regularity the alert will trigger.



    Sound Alerts


Both files stored in the \MetaTrader 4\sounds\ directory of the Client Terminal and any other files can be used as sound alerts: "WAV", "MP3", "WMI". If a file in the "MP3" or "WMI" format is chosen, the application related to these file types will be launched at alert triggering.




    Executable Files


Executable files can be in formats of "EXE", "VBS", "BAT". If a file of any other format has been chosen, the application related to these file types will be launched at alert triggering.




   Emailed Messages


To get alert messages via email, it is necessary to make presettins in the "Email" tab of the "Tools -> Options" menu. Check the "Enable" field and enter your email server settings in the corresponding fields. In each field, you can see red prompts about the data format to be entered.

  • SMTP server – address of your mailing server when accessed via SMTP. Please do not forget to specify the port number separated by a colon. It is usually port 25. Example: smtp.mail.ru:25
  • SMTP login – it is usually your email address. Example: your_name@mail.ru
  • SMTP password – a password used to access to your mailbox.
  • From: – you should enter the login ("Your name") and your email address on the same server, the SMTP of which you would like to use. As a rule, the login coincides with the first part of the email address, but it can be skipped. Example: your_name, your_name@mail.ru
  • To: – email address you would like to send alerts to. The "Your name" part of the address can be skipped. In general, the "To:" field should be filled out with any real email address. Example: any_name, your_name@mail.ru


Click on the "Test" button and check whether the message has been delivered to the email address you have specified in the "To:" field. If all settings have been written correctly, the message: "Mail: 'Test message' has been sent" must appear in the "Journal".


For sms messages to be sent, you have to specify the email address provided by your cellular operator in the "To:" field. To use the operator's SMTP server as such, you have to verify its settings on the operator's website or at the accounts department. At that, please keep in mind that not all cellular operators permit to use their SMTP servers without calling to POP3 servers.


Then the alert as such can be created. To do so, press Insert in the "Alerts" tab in the "Terminal" window. Fill out all the fields:




To create the message text, click on the  button near the "Source" line. Enter the subject and the body of the message. Both in the subject and in the message body, you can use "Macros". The list of macros is available from the context menu.


After this, click on the "Send" button.

Having filled out other fields, click on the "Test" button and check whether the alert has income at your mailbox. If the message has been sent successfully,  the corresponding record will appear in the "Journal":




    Publishing of Reports on FTP Server


The terminal allows publishing in internet reports about the account status on a periodic predetermined base.



For this, it is necessary to set up connection to the internet via FTP. Open the "Tools -> Options" menu and go to the "Publisher" tab.

The red color specifies the format to be used for entering the data.



The data transfer can be performed in either active or passive mode. The main deifference between them is the side that opens connection to transfer data. In the active mode, the FTP server initiates connection, and in the passive one, the customer does.


Periodicity is the minimal time intervalб with which the report will be published. At that, if a trading position or order changes in the terminal, the report will be forcedly and immediately published. This mechanism provides data accuracy (except for the current market price and the profit) in the report.

After all settings have been made, click on the "Test" button. If the report has been successfully sent, the corresponding line will appear in the "Journal".



    

Translated from Russian by MetaQuotes Software Corp.
Original article: https://www.mql5.com/ru/articles/1416

Last comments | Go to discussion (16)
MQL4 Comments
MQL4 Comments | 15 Dec 2008 at 02:06
How do I disable the alert window from poping up?
victor
victor | 12 Mar 2009 at 21:58

how to make metatrader to alert for following events:

1- a position closed by TP

2- a position closed by SL

3- a position closed manualy

4- a candle closes ( a tick alert to be played)

5- a position becomes closer to SL (as SL box color turns red)

6- a position becomes closer to TP (as TP box color turns green)

any help much appritiated

VICTOR1967

xxxxxxx yyyyy
xxxxxxx yyyyy | 7 Mar 2010 at 06:05

hi all,


i got this error message


11:38:59 Mail: 530 5.7.0 Must issue a STARTTLS command first. 23sm1252103ywh.0
11:38:59 Mail: 'Test message' failed


what is the solution?

dipea71
dipea71 | 20 Oct 2013 at 14:13
10265293:

hi all,


i got this error message


11:38:59 Mail: 530 5.7.0 Must issue a STARTTLS command first. 23sm1252103ywh.0
11:38:59 Mail: 'Test message' failed


what is the solution?

Pankaj Bhatlawande
Pankaj Bhatlawande | 3 Mar 2015 at 12:09
mql4_comments:
Can you make alerts for indicators?/ I mean when there is a crossing of MA200, or RSI etc.???
Hey, are you able to solve your problem.
Secrets of MetaTrader 4 Client Terminal Secrets of MetaTrader 4 Client Terminal

21 way to ease the life: Latent features in MetaTrader 4 Client Terminal. Full screen; hot keys; Fast Navigation bar; minimizing windows; favorites; traffic reduction; disabling of news; symbol sets; Market Watch; templates for testing and independent charts; profiles; crosshair; electronic ruler; barwise chart paging; account history in the chart; types of pending orders; modifying of StopLoss and TakeProfit; undo deletion; chart print.

My First "Grail" My First "Grail"

Examined are the most frequent mistakes that lead the first-time programmers to creation of a "super-moneymaking" (when tested) trading systems. Exemplary experts that show fantastic results in tester, but result in losses during real trading are presented.

Testing of Expert Advisors in the MetaTrader 4 Client Terminal: An Outward Glance Testing of Expert Advisors in the MetaTrader 4 Client Terminal: An Outward Glance

What happens after you have clicked on the "Start" button? The article answers this and many other questions.

Secrets of the MetaTrader 4 Client Terminal: Indicators Secrets of the MetaTrader 4 Client Terminal: Indicators

Are you going to write your own indicator? Perhaps you will find that what you need among indicators already embedded in the client terminal. So why to reinvent the wheel? A summary table of integrated indicators' characteristics; special features and methods of attaching indicators to a chart; building of levels; displaying of indicators on different timeframes.