Message
Selecting the configuration (+) button of an Element will display the Configuration Window. The Message Tab is found in the Configuration window. |
The Message Tab of an Element allows information to be sent from a running Expert Advisor.
There are two sections of the Message Tab, Data and Output:
Datasection:
- A Message is enabled by selecting the Send message checkbox.
- Any text can be entered into the Message text-box.
- The Data text-box is read-only. The Choose button is used to add a value to the Data text-box.
- The Write last error check box can be used to write out the last error that occurred in the running EA.
- Function Elements display a checkbox to write the value of the function.
Outputsection:
- The Write to Journal checkbox will send the Message data to the Journal tab of the MetaTrader Platform.
- The Show Alert checkbox will display the Alert window on the MetaTrader Platform.
- The Play Sound checkbox will play the specified sound. The sound options are provided from the MetaTrader Platform sound file.
- The Send Email checkbox will send an Email of the data from the MetaTrader Platform. The MetaTrader Platform must be configured to send emails.
- The Write on Chart checkbox will display the data on the price chart. The Message data can be added to other messages on the chart, or it can clear all other message data.
Note: The Journal Tab is useful for debugging a running EA. Messages can be used to determine if the execution of the EA is following the desired path and if the values of variables are correct.